Last modified: 2014-02-12 23:38:00 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T40599, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 38599 - adding HTML5 input fields
adding HTML5 input fields
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
SemanticForms (Other open bugs)
master
All All
: Unprioritized enhancement with 1 vote (vote)
: ---
Assigned To: DaSch
:
Depends on:
Blocks: html5
  Show dependency treegraph
 
Reported: 2012-07-23 13:50 UTC by DaSch
Modified: 2014-02-12 23:38 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description DaSch 2012-07-23 13:50:17 UTC
I tried to create an Extension to get use of new HTML5 fields.
https://github.com/DaSchTour/SemanticFormsHTML5

But I failed totaly because the fields I created where not displayed.

Even when trying something simple like described here
http://www.mediawiki.org/wiki/Extension:Semantic_Forms/Developers%27_documentation
It did not work.

For example like this

global $sfgFormPrinter;
$sfgFormPrinter->setInputTypeHook('html5', 'sfHtml5', array());

function sfHtml5($cur_value, $input_name, $is_mandatory, $is_disabled, $other_args) {
		global $sfgTabIndex, $sfgFieldNum, $sfgShowOnSelect;

		if ( array_key_exists( 'class', $other_args ) ) {
			$className .= ' ' . $other_args['class'];
		}
		$input_id = "input_$sfgFieldNum";
		$disabled_text = ( $is_disabled ) ? 'disabled' : '';
		$html5input=$field_args['html5'];
		$html = <<<END
	<input id="$input_id" name="{$input_name}[value]" type="$html5input" class="$className" tabindex="$sfgTabIndex" $checked_str $disabled_text/>
END;
		return $html;
	}

It only should enter the input of tje html5 attribut into the type field. I only get an non-type-error.

It would be really great if someone could help with this. Would be nice to get the possibility for testing HTML5 input types. This way some of the jQuery workarounds could get obsolete in future.
Comment 1 DaSch 2012-07-23 13:54:26 UTC
Here is the idea I had
https://github.com/DaSchTour/SemanticFormsHTML5/tree/dev

I tried with color, number and email
Comment 2 DaSch 2012-07-23 14:49:30 UTC
Assining this to me. There were some problems when testing, because SemanticForms overrieds field that misses or do not fit with template.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links