Extension talk:Semantic Forms Inputs/Archive 2/Flow export
This page used the LiquidThreads extension to give structured discussions. It has since been converted to wikitext, so the content and history here are only an approximation of what was actually displayed at the time these comments were made. |
Datetimepicker default value
When I have an input of the native SF type datetime, it accepts this default value "1/1/2011 7:30:00 PM", when I use datetimepicker, it does not, as it's requiring the notation to be in yyyy/mm/dd hh:mm. It's probably best if SFI used the same parsing code as SF here, to avoid such inconsistencies. Jeroen De Dauw 16:17, 28 February 2011 (UTC)
- Huh, even when using yyyy/mm/dd hh:mm, it's just showing the value for yyyy as default. This is happening for MW+SMW+SF+SFI trunk. Jeroen De Dauw 16:21, 28 February 2011 (UTC)
- True, and don't ask me how it got in. Will fix it tonight. Really stupid error, too - tried to use + to concatenate strings in PHP. F.trott 15:42, 1 March 2011 (UTC)
- Fixed it in r83050. F.trott 22:10, 1 March 2011 (UTC)
- Awesome, thanks. Will update the wiki where I'm using this soonish and let you know if I encounter any further problems :) Jeroen De Dauw 02:40, 3 March 2011 (UTC)
- Fixed it in r83050. F.trott 22:10, 1 March 2011 (UTC)
- True, and don't ask me how it got in. Will fix it tonight. Really stupid error, too - tried to use + to concatenate strings in PHP. F.trott 15:42, 1 March 2011 (UTC)
Dynamic default value (now) possible?
With SF's input type=date or datetime it's possible to specify 'default=now', and it'll fill in the current time, is this also possible with date(time)picker? 'default=2025/07/04' in the form definition does not work, since the #time parser functions does not get evaluated. Patrick Nagel 13:48, 9 March 2011 (UTC)
- I'm afraid it is not possible with either of them. The default value is handed down to the input type in the same parameter as the current value, there is no possibility to distinguish between them so I can't decide when to parse and when not. The solution lies with SF here. You might vote on this or this bug or (more effectively) discuss it with Yaron directly. F.trott 20:35, 9 March 2011 (UTC)
- It's not clear to me that this requires any change from SF - it might just need a fix in SFI. F.trott and I talked about the issue "offline", but now I don't remember what the conclusion was. Yaron Koren 16:00, 11 March 2011 (UTC)
- I do. :)
- The point is, SFI could parse the current/default value given as a parameter to the input. But then it would also parse any user input a user might have done earlier. E.g. lets say it would indeed parse the value. Along comes some user thinking that "{{#time:...}}" would be a good thing to put into that field - would result in a valid date after all. This user would fully and rightly expect that "{{#time:...}}" appears verbatim in the page. It even would after the first edit. Then on the second edit the datepicker would parse that string and save it, i.e. it would replace the parser command by a static value. F.trott 22:49, 11 March 2011 (UTC)
- It's not clear to me that this requires any change from SF - it might just need a fix in SFI. F.trott and I talked about the issue "offline", but now I don't remember what the conclusion was. Yaron Koren 16:00, 11 March 2011 (UTC)
- Patrick, could you try updating to the last SVN version of SF and using
default={{#time:Y/m/d}}
? (You will need Extension:ParserFunctions if you don't have it yet.) The "default" parameter should get parsed now. It's still brand new, so any bug reports would be welcome. F.trott 22:57, 15 March 2011 (UTC)- just tried that, but the date doesn't get parsed inside the form field.
- I'm using SF 2.2.1, SFI 0.4.2 alpha, parser functions 1.4.0 213.33.22.122 21:50, 8 August 2011 (UTC)
- Hmm, should work.
- What exactly do you specify as the default and what is displayed in the form?
- And does it work if you use a different input type, e.g. text? F.trott 07:34, 9 August 2011 (UTC)
- Using default with the parser worked for me. Remember that if you use a parser within a field declaration make sure it is not the last parameter specified, or if it is, place the 3 field closing curly braces on the next new line, otherwise it will break the field; for example:
- WRONG:
{{{field|bulletin_date|mandatory|input type=datetimepicker|default={{#time:Y/m/d}}}}}
- RIGHT:
{{{field|bulletin_date|mandatory|default={{#time:Y/m/d}}|input type=datetimepicker}}}
- RIGHT: Cheers. Thorncrag 19:12, 10 October 2011 (UTC)
{{{field|bulletin_date|mandatory|input type=datetimepicker|default={{#time:Y/m/d}} }}}
- That bug is mentioned in the documentation - if it's any simpler, you don't even need a newline, you just need a space (like "}} }}}"). Yaron Koren 21:12, 10 October 2011 (UTC)
- Just to add a bit to this. One has to make sure that form definitions are not cached. So if this is in the LocalSettings.php:
$sfgCacheFormDefinitions = true;
it will have to be removed to make sure that dynamic values can be generated every time a form is used. This also is already mentioned in the documentation. [[kgh]] (talk) 14:53, 6 May 2014 (UTC)
- Just to add a bit to this. One has to make sure that form definitions are not cached. So if this is in the LocalSettings.php:
- WRONG:
- Using default with the parser worked for me. Remember that if you use a parser within a field declaration make sure it is not the last parameter specified, or if it is, place the 3 field closing curly braces on the next new line, otherwise it will break the field; for example:
Buttons don't do anything
Hi,
For me, the buttons appear, but don't do anything when clicked in either Firefox or IE.
I'm running:
- MW 1.16.2
- Semantic Forms (Version 2.1.1)
- Semantic Forms Inputs (Version 0.4.1)
- Semantic Maps (Version 0.7.6.1)
- Semantic MediaWiki (Version 1.5.6)
- Semantic Result Formats (Version 1.5.3)
Any ideas? Thanks, Jon 122.57.135.67 21:15, 3 April 2011 (UTC)
- PS, seemed to start working if I only have one picker on a page. I had two. JonPovey 21:21, 3 April 2011 (UTC)
- You could try to update Semantic Forms, version 2.1.1 was pretty buggy.
- If that does not help, please try to reproduce the bug on http://scratchpad.referata.com/wiki/Form:Project_Facts.
- Or open the Firefox error console (ctrl-shift-J) and see if any JavaScript errors pop up. F.trott 21:35, 3 April 2011 (UTC)
- I have the same problem: clicking the Buttons does not trigger any reaction.
- I am running:
- MW 1.16.1
- Semantic MediaWiki (Version 1.6)
- Semantic Forms (Version 2.2.1)
- Semantic Forms Inputs (Version 0.4.1)
- I did the ctrl-shift-J and saw several errors, but nothing that has to do with Semantic Forms Inputs. At least I did not see it.
- But Internet Explorer told me the problem:
Message: The object does not support this value oder method
Line: 154
Character: 2
Code: 0
URI: http://xxxx/mediawiki/extensions/SemanticFormsInputs/libs/datepicker.js
- Line 154 in my datepicker.js is as follows:
var disabledDates = jQuery( input ).datepicker( "option", "disabledDates" );
- What could be wrong there?
- Any help is greatly appreciated Eilan Ardanos 13:31, 26 September 2011 (UTC)
semanticformsinputs-desc not shown on Special:Version
Hi, I just want to let you know, that the description of the extension is not being displayed on Special:Version. (SFI 0.4.1 and MW 1.16.2) Cheers [[kgh]] 19:48, 5 April 2011 (UTC)
- Hi kgh, can't reproduce it. See here for example: http://scratchpad.referata.com/wiki/Special:Version. F.trott 21:19, 5 April 2011 (UTC)
- Hmm, did you try using another language than English? This problem occurs on all three of my installations. Thus I think it is not happening hazardously. Cheers [[kgh]] 21:36, 5 April 2011 (UTC)
- Yes, no problem at all: http://scratchpad.referata.com/wiki/Special:Version?uselang=de
- I also set the wiki language in LocalSettings.php. Again no problems.
- We had this before. What was the solution back then? https://bugzilla.wikimedia.org/show_bug.cgi?id=25017 F.trott 22:01, 5 April 2011 (UTC)
- Oops, I totally forgot about this. :( Now I remember: I directly replaced semanticformsinputs-desc by description and inserted the desciption in SemanticFormsInputs.php. The only strange thing is that it is the only extension behaving like that. Since nobody else seems to run into this I suspect me as the big bug. :) Thank you again for taking you time and looking into it. I will do some further investigation. Cheers [[kgh]] 22:16, 5 April 2011 (UTC)
- Hmm, did you try using another language than English? This problem occurs on all three of my installations. Thus I think it is not happening hazardously. Cheers [[kgh]] 21:36, 5 April 2011 (UTC)
Timepicker/Datetimepicker - minute selection
Is the datetime picker designed to only shows the hour, not hour and minute? --Dgennaro 19:49, 9 May 2011 (UTC)
- No, it definitely should show minutes (15min steps by default). F.trott 20:16, 9 May 2011 (UTC)
- I have created a test form on Scratchpad Referata. --Dgennaro 20:28, 9 May 2011 (UTC)
- Works for me on IE8 and FF4.0.1 (both WinXP), shows 00:00 to 23:30 in 30 min steps. Can't check other browsers right now. F.trott 20:35, 9 May 2011 (UTC)
- Ah, yes. We are running IE 7 and FF3.6.6 and are unable to update. Thanks for checking. --Dgennaro 21:00, 9 May 2011 (UTC)
- Ok, just had a look at it in IE7 mode. Sure looks ugly (but shows the minutes, maybe they didn't bork down the ie8 enough to simulate ie7 correctly). Anyway, I'll look into it, but it may take some time. F.trott 21:43, 9 May 2011 (UTC)
- Much appreciated...I will await the changes. --Dgennaro 19:34, 10 May 2011 (UTC)
- Ok, just had a look at it in IE7 mode. Sure looks ugly (but shows the minutes, maybe they didn't bork down the ie8 enough to simulate ie7 correctly). Anyway, I'll look into it, but it may take some time. F.trott 21:43, 9 May 2011 (UTC)
- Ah, yes. We are running IE 7 and FF3.6.6 and are unable to update. Thanks for checking. --Dgennaro 21:00, 9 May 2011 (UTC)
- Works for me on IE8 and FF4.0.1 (both WinXP), shows 00:00 to 23:30 in 30 min steps. Can't check other browsers right now. F.trott 20:35, 9 May 2011 (UTC)
- I have created a test form on Scratchpad Referata. --Dgennaro 20:28, 9 May 2011 (UTC)
Timepicker JavaScript error when editing already-existing field
Hello, all. I have a form with a repeating multiple instance template with 2 timepicker fields inside. The fields save correctly the first time I click "Add Another" and generate the new fields. I can use the JavaScript timepicker just fine, and the data saves correctly to the page.
However, when I try to edit that same page, there is a JavaScript error when I click on any of the existing timepicker icons. (Any new fields created by clicking "Add Another" work just fine though.) The JavaScript error on each click reads:
document.getElementById(this.id.replace("_button", "_tp_show")) is null
Thanks so much for your help! This is a great extension! --Blicarea 04:42, 31 July 2011 (UTC)
datepicker error
I want to have a datepicker field. I've installed this extension latest version (0.4.1) I've added it to an existing working form on MW 1.16.5+SMW 1.5.6 + SF 2.2. But it's not working, I'm getting an empty field instead of a nice datepicker box. I'm noticing a javascript error Error: missing ] after element list Line: 92, Column: 25 Source Code:
monthNamesShort: ['ינו,'פבר,'מרץ','אפר,'מאי','יוני','יולי','אוג,'ספט,'אוק,'נוב,'דצמ],
(month names are in hebrew)
Obviously ] is not missing. Is this a known error? Thank you85.250.162.123 16:21, 19 August 2011 (UTC)
- Hi,
- no, this is not a known error, so thanks for the report!
- The problem seems to be with the hebrew localization. For some reason the month names contain apostrophes and apparently I did not escape them before including them in the JavaScript code. This leads to garbage strings which the browser can not interpret.
- I will fix this bug in the next version, though I am pretty busy right now, so it could take a bit. If you want you can monitor the bug report I created for that: https://bugzilla.wikimedia.org/show_bug.cgi?id=30478 . Just add your email address to the CC list. F.trott 19:38, 20 August 2011 (UTC)
- Thanks.
- Either way, I manually changed the abbreviated month names in MessagesHe.php, which made this error message disappear, but the datepicker is still not working, and all I get is still an empty box instead of a nice date picker. So this is not the only problem.
- Since there are no more errors, just a lot of warnings it's hard to tell what is the problem now 85.250.162.123 18:00, 21 August 2011 (UTC)
Screeenshots
The docs are quite nice, except that you cannot get an idea of what a certain input looks like at a glance. Having some screenshot for each input would greatly help that. And maybe with each screenshot a link to some example. Jeroen De Dauw 13:29, 19 October 2011 (UTC)
- Screenshots are easy, will do that.
- Example is a bit more difficult, you'd need something stable. I'll think about how this could be done. F.trott 14:28, 19 October 2011 (UTC)
Any reason to not support second resolution in hh:mm:ss?
It would be handy if the date and time pickers could support second resolution. Is there any reason to not support second resolution in hh:mm:ss? Badon 18:40, 31 October 2011 (UTC)
- It looks like even with the Unix time format, second resolution is removed. Badon 18:48, 31 October 2011 (UTC)
SemanticFormsInputs.i18n.php
Hi, the /qqq section is somehow diveded into two parts and thus contains double entries. Cheers [[kgh]] 14:45, 3 December 2011 (UTC)
- Thanks, I fixed it.
- Cheers, F.trott 16:01, 3 December 2011 (UTC)
No year scrolling
Hi, I've just installed Inputs and I'm having a problem with the datepicker. The year selection seems to be fixed in a 10 year period either side of the default (or last selected) year. Scrolling thru to years not appearing in the list is not possible. MW 1.18, SF 2.3.1, SFI 0.5, SMW 1.6.1.
Fault is not dependednt on the "first date =" variable
I've tried IE on XP an Firefox on Mac OSX, same result.
Is it a bug or a problem with my settings somewhere?
Cheers - Scott Scott D 00:45, 11 December 2011 (UTC)
- You are right. What would be the expected behaviour, though? F.trott 10:07, 11 December 2011 (UTC)
- Sorry for the delayed reply, been rather busy of late...
- I would expect it to keep scrolling back/forward through the years until you stopped pressing the up or down arrow. One of the forms I am using it in is to input a vehicle's year of manufacture. When someone begins to fill out the form and selects the year then they can only scroll back as far as 2001. This may confuse some into thinking that they cannot enter a date prior to that. Scott D 13:15, 19 December 2011 (UTC)
- I would like it to work a bit differently than you proposed (e.g. like this, preferably with a click-and-hold feature for fast forward/backward), but I agree, that something like that would be a really nice feature. The problem is, it would require a change to the jQuery datepicker code, which is out of the scope of this extension. I will note it as a feature request, but better don't hold your breath on it.
- If you are really intent on having this, you would have to drive it. I.e get someone at jqueryui.com to implement your feature and then kick me again to use it.
- (What I probably could do is give you some option where you could set the years shown in the dropdown.) F.trott 13:53, 19 December 2011 (UTC)
- Either way would work. I'd be surprised if it's hard to fix the existing control though. When you click on the year control, if you select the earliest year in the list the control disappears and shows the year selected. The next time you click on the control the year previously selected is centred in the list and you can go back another ten years. The control can eventually be 'hacked' to get back to the year that you want, you just can't get there via the scroll buttons. Scott D 10:54, 20 December 2011 (UTC)
- Hi! To change the range of years you can add the following change in the datepicker.js file. Look for this piece of code:
inputShow.datepicker( { 'showOn': 'both', 'buttonImage': params.buttonImage, 'buttonImageOnly': false, 'changeMonth': true, 'changeYear': true, 'altFormat': 'yy/mm/dd', // Today button does not work (http://dev.jqueryui.com/ticket/4045) // do not show button panel for now // TODO: show date picker button panel when bug is fixed 'showButtonPanel': false, 'firstDay': params.firstDay, 'showWeek': params.showWeek, 'dateFormat': params.dateFormat, 'beforeShowDay': function ( date ) {return SFI_DP_checkDate( '#' + input_id + '_show', date );} } );
- Then add the following line inside that block:
'yearRange': 'c-200:c+10',
- That will change the range of years (200 in the past from today's year and 10 years in the future). More info can be found in DatePicker documentation. FrancoIacomella (talk) 17:37, 28 May 2013 (UTC)
Regular Expression for validating that Form Inputs don't contain special characters
Hi,
I spent weeks trying to find how to do this - so I thought it would be a good idea to tell other people.
Here's a form input with regular expression, that validates that there are no
{{, }} or |
characters in the field:
(Ref https://bugzilla.wikimedia.org/show_bug.cgi?id=30042 and http://wikimedia.7.n6.nabble.com/Semantic-Forms-Need-better-input-checking-td555083.html)
{{{field|Description | input type=regexp |base type=regexp |or char=; |regexp=/(?:^\{\{VALIDATIONOFF\}\};^(?:(?!\{\{;\}\}).)*$)/ |message=Dont use }} or {{ without making sure that you always have a matched pair of brackets. To bypass this warning please put { {VALIDATIONOFF} }; at the very beginning of your input (without the spaces). |base prefix=filter2 |filter2.regexp=/\!/ |filter2.inverse |filter2.message=Don't use a pipe {{!}} in the input. Use { {!} } instead (without the spaces and not inside <pre>) |filter2.base type=textarea |rows=10|cols=100|autogrow }}}
195.212.29.94 09:34, 14 December 2011 (UTC)
Multiple values for a menuselect field
Hi all,
I'm trying to use multiple values for a menuselect field. I tried to use a arraymap as Semantic Forms but it doesn't work. I don't know if it's possible but if it's case a help will be welcome. Thanks in advance Fary 10:34, 23 January 2012 (UTC)
- I share my little progress despite I don't have what I would want. May be I can have a feedback that can help me!
- I use a template and with the call I can have the number of fields I want. But the problem is since I specify values with a menuselect and when I edit the page for the first time values do not appear and if I enter values by my hand it doesn't considere it!
{{{for template|MyTemplate|multiple}}}
I'm working on, if I have a solution I will share wiht you but if somebody has an idea it is welcome Cheers. 85.152.18.129 16:58, 23 January 2012 (UTC)
- the previous post is mine! I forgot to identify myself Fary 17:05, 23 January 2012 (UTC)
- Hi. I am not sure I understand the problem. Could you explain a bit more? Maybe using a concrete example? F.trott 10:17, 27 January 2012 (UTC)
- Here is an example
{{{for template|InfrastructureType|multiple}}} {{{field|Infrastructure type|input type=menuselect |size=75 |structure= *Cultural Building *School *Hospital }}} {{{end template}}}
- the problem is when I create a page with this template the scrolling list doesn't display Fary 12:20, 27 January 2012 (UTC)
- That's a bug, it definitely should display. I will investigate it. F.trott 12:31, 27 January 2012 (UTC)
- I reworked the menuselect input. Could you try the development version and see if ti works now? (You will also have to update Semantic Forms to the latest version.) F.trott (talk) 08:51, 12 March 2012 (UTC)
- That's a bug, it definitely should display. I will investigate it. F.trott 12:31, 27 January 2012 (UTC)
- Hi. I am not sure I understand the problem. Could you explain a bit more? Maybe using a concrete example? F.trott 10:17, 27 January 2012 (UTC)
- the previous post is mine! I forgot to identify myself Fary 17:05, 23 January 2012 (UTC)
MW 1.18.1, SF 2.4.1, SFI 1.7.1 incompatibility? (datepicker)
Forms with datepicker cannot be loaded. I am getting the following PHP errors:
PHP Notice: Undefined variable: wgLang in <extension_path>/SemanticFormsInputs/includes/SFI_DatePicker.php on line 177, referer: <referer_url> PHP Fatal error: Call to a member function getCode() on a non-object in <extension_path>/SemanticFormsInputs/includes/SFI_DatePicker.php on line 177, referer: <referer_url>
I have commented out all other extensions except for Semantic Bundle extensions.
Running: MW 18.1, SF 2.4.1, SFI 1.7.1 and latest SVN update of other Semantic Bundle extensions Mtyeh411 (talk) 15:08, 9 March 2012 (UTC)
jquery-ui files moved from SF to SMW
Hi,
I noticed Semantic Forms Inputs still uses the former location of the jquery-ui files, namely $sfgScriptPath.
Since the files have moved to the SMW core extension, this seems to fix the problem: (in SemanticFormsInputs/includes/SFI_DatePicker.php)
- global $sfgScriptPath, $sfigSettings; + global $sfgScriptPath, $sfigSettings, $smwgScriptPath; - $wgOut->addExtensionStyle( $sfgScriptPath . '/skins/jquery-ui/base/jquery.ui.datepicker.css' ); - $wgOut->addExtensionStyle( $sfgScriptPath . '/skins/jquery-ui/base/jquery.ui.theme.css' ); - $wgOut->addScript( '<script type="text/javascript" src="' . $sfgScriptPath . '/libs/jquery-ui/jquery.ui.datepicker.min.js"></script> ' ); + $wgOut->addExtensionStyle( $smwgScriptPath . '/skins/jquery-ui/base/jquery.ui.datepicker.css' ); + $wgOut->addExtensionStyle( $smwgScriptPath . '/skins/jquery-ui/base/jquery.ui.theme.css' ); + $wgOut->addScript( '<script type="text/javascript" src="' . $smwgScriptPath . '/libs/jquery-ui/jquery.ui.datepicker.min.js"></script> ' );
Clausekwis (talk) 14:29, 15 April 2012 (UTC)
- Thanks. Pastakhov (talk) 07:57, 16 April 2012 (UTC)
- Thanks for your efforts. Nice to see people care for this extension enough to actually dig through the code.
- SFI got some rework in the development version available from SVN that includes basing it entirely on the ResourceLoader and removing the sfgScriptPath dependency. Note, that smwgScriptPath is also not needed, as the datepicker is available directly from the jQuery modules included with MW.
- Long story short: Try using the development version.
- Cheers, F.trott (talk) 20:27, 16 April 2012 (UTC)
Datepicker doesn't show
Hi, I'm having a strange problem. Datepicker doesn't show in a wiki that is the same as far as I can see as another wiki where the datepicker works fine. I can't figure out where it goes wrong.
Both wiki's are the same in the sense that they have the same versions of MW (1.18.2), SMW (1.7.1), SF (2.4.2) and SFI (0.5), same preferences and same LocalSettings (as far as relevant).
Differences are that the wiki with datepicker showing is older and has been upgraded several times. The other one is a first installation with these versions. Other difference is that the ok wiki has a newer php version: 5.3.2 vs 5.2.11 for the nok wiki.
Thanks, AdSvS (talk) 10:28, 17 April 2012 (UTC)
- Hi, jquery script located in the cache before SF upgraded. Try using the development version of Semantic Forms Inputs. Pastakhov (talk) 10:42, 17 April 2012 (UTC)
- Hi, I've got version 0.6alpha now of SFI, but it still doesn't work :-(. AdSvS (talk) 11:30, 17 April 2012 (UTC)
- Hi,
- are there any JavaScript errors reported? (Ctrl+J on Frefox) F.trott (talk) 17:51, 17 April 2012 (UTC)
- See Extension talk:Semantic Forms Inputs/Archive 2/Flow export#c-Clausekwis-2012-04-15T14:29:00.000Z-jquery-ui_files_moved_from_SF_to_SMW. This work for me. Pastakhov (talk) 03:37, 18 April 2012 (UTC)
- Hi, I've got version 0.6alpha now of SFI, but it still doesn't work :-(. AdSvS (talk) 11:30, 17 April 2012 (UTC)
Timepicker slow
Just noticed in the code that the timepicker is a custom jquery-ui that uses fadeIn/fadeOut, I personally think this should be replaced by show/hide with a shorter timeout as it makes selection very slow. Maybe a better UI should be provided as mobile device will have hard time using this as it is really high in height. TiCPU (talk) 22:46, 3 May 2012 (UTC)
- Hi TiCPU, show/hide would mean to have no timeout at all. Balancing the number of available choices with the need to have something that allows choosing the time with a minimum of mouse clicks/mouse mileage is challenging. If you have ideas on how an improved UI could work, I would be very interested.
- Cheers, F.trott (talk) 22:53, 3 May 2012 (UTC)
- Maybe a simple dropbox would be enough, as you can configure the increments and start/stop time, most user will use the scroll wheel and mobile will use their dropbox.
- I tried using show/hide instead of fadein/out here and it works fine, I then changed the timeout from 400 show / 400 hide to 20 show / 100 hide with nice results, no more delay. TiCPU (talk) 06:40, 4 May 2012 (UTC)
- You can use a simple dropbox already, there is an input type for that. And frankly, scrolling through dozens of values (e.g. 120 for 10 hours) is not my idea of what it should look like.
- As for hide vs. fade. I think this is a matter of taste. I will think about shorter delays. F.trott (talk) 07:48, 4 May 2012 (UTC)
Tiny tutorial for programming SFI?
Hi Stephan and all the developers! Would you mind to write sometime a tiny manual on how to program new Form Input? Katkov Yury (talk) 18:29, 5 May 2012 (UTC)
- Hi Yury, a very short manual would probably be something like
- 1. Create a subclass of SFFormInput, e.g. call it MyNewInputClass
- 2. Register your new input like this: $sfgFormPrinter->registerInputType( 'MyNewInputClass' );
- There are a few things to be aware of (e.g. the expected name attribute of the html input elements), but this is the basic idea.
- I think the SFI code improved a lot lately, so it should be possible to follow what is done there. E.g. have a look at the timepicker code.
- And if you come up with an input, that could be useful for others, consider contributing it!
- Cheers, F.trott (talk) 08:25, 9 May 2012 (UTC)
- I have almost finished with my FormsInput for picking multiple elements so I'll be able to expand your instructions a little bit. I still don't understand some things, would you mind to help me with them?
- the name attribute of the form input sometimes have brackets like in it like this: input3[].
- On the other hand sometimes we add an additional hidden element like .
Html::hidden($name . '[is_list]', 1)
- And thirdly we have the method canHandleLists() to override.
- It seems that all three thing are indicating that the form input can handle lists, but it's pretty weird to see three different pieces of code trying to say the same thing. :-) Katkov Yury (talk) 09:45, 9 May 2012 (UTC)
- I have almost finished with my FormsInput for picking multiple elements so I'll be able to expand your instructions a little bit. I still don't understand some things, would you mind to help me with them?
Installed, but doesn't seem to take effect
Hi, I'm having trouble getting SFI to work at all on my site. I have it installed (confirmed by the Version page), as well as MediaWiki (1.18.1), Semantic MediaWiki (Version 1.7.1), Semantic Forms (Version 2.4.2), etc. However, when I try adding SFI fields (I copied the Datepicker, Timepicker, and Menuselect examples exactly), it's as though SFI isn't installed at all, I just get the regular text input field, (and a list below it for menuselect). I do get a Javascript error
jQuery("#sfForm").data("SemanticForms") is undefined,
but I'm not sure it's related, as I get the same error sometimes when there aren't any SFI fields on the page. I've tried the development version as well, and it doesn't seem to change anything.
I'm pretty much out of ideas; any help appreciated! Iisai1821 (talk) 16:38, 7 June 2012 (UTC)
- Hi. The JavaScript error is related in that it crashes JavaScript. All the SFI inputs are designed to fall back to some standard input in case JavaScript is not available. That is what you see. Do you by any chance use a custom skin? F.trott (talk) 16:46, 7 June 2012 (UTC)
- I'm using the 'danger' skin, but I just tested it in 'standard' and 'vector' and got the same results.
- Thanks for your reply! Iisai1821 (talk) 17:26, 7 June 2012 (UTC)
- On further investigation, the Javascript error only occurs when I 'Preview' a form - it isn't caused by the SFI field, and when I just save the form, with the field, without preview, there are no Javascript errors, and the datepicker and datetimepicker work! However, the menuselect field, which is what I really want to use, still doesn't. When the extension page says This does currently only work in the development version on SVN. does that refer to the whole menuselect field, or just linking internally? Iisai1821 (talk) 17:40, 7 June 2012 (UTC)
- Up until yesterday I would have said, that sentence should be dropped. I tried it yesterday on an 1.18.3 mediawiki and it seemed to work. Can you try if it works on http://scratchpad.referata.com? F.trott (talk) 05:52, 8 June 2012 (UTC)
- I get the same behavior as I do on my site. Maybe I'm using it wrong? I'm still copying the example: http://scratchpad.referata.com/wiki/Special:FormEdit/ActiveFormTest/Test_Page Iisai1821 (talk) 13:47, 8 June 2012 (UTC)
- Very good, that helps a lot. I will investigate what could be the problem and come back to you.
- Cheers, F.trott (talk) 14:34, 8 June 2012 (UTC)
- Sorry, it took me a while. I think I fixed this. Could you try the SFI version from https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/SemanticFormsInputs.git;a=snapshot;h=refs/changes/38/12438/1;sf=tgz and tell me if it works for you? Or if you have git installed and SFI cloned, just do a
git pull https://gerrit.wikimedia.org/r/mediawiki/extensions/SemanticFormsInputs refs/changes/38/12438/1
F.trott (talk) 18:35, 21 June 2012 (UTC)
- Sorry, it took me a while. I think I fixed this. Could you try the SFI version from https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/SemanticFormsInputs.git;a=snapshot;h=refs/changes/38/12438/1;sf=tgz and tell me if it works for you? Or if you have git installed and SFI cloned, just do a
- I get the same behavior as I do on my site. Maybe I'm using it wrong? I'm still copying the example: http://scratchpad.referata.com/wiki/Special:FormEdit/ActiveFormTest/Test_Page Iisai1821 (talk) 13:47, 8 June 2012 (UTC)
- Up until yesterday I would have said, that sentence should be dropped. I tried it yesterday on an 1.18.3 mediawiki and it seemed to work. Can you try if it works on http://scratchpad.referata.com? F.trott (talk) 05:52, 8 June 2012 (UTC)
Download Link Incorrect
The download link in the Infobox seems to point to a completely different extension.. "Lingo?" Ashimema (talk) 08:14, 6 July 2012 (UTC)
datepicker with german user localisation doesn't work correctly
Hi all! First, a big big thank to all who lets live this great software! And sorry for my english. As a rather unexperimented admin of a unfortunately non-public smw-wiki I don't now where to tune for this problem: The datepicker popup let me choose a date, but it fills in the form-field in a strange way: "TT.November.JJ" instead of "31/10/2012". The saved page contain also the defective string. When I edit a page witch contains already a correct date-string with the datepicker oder the datetimepicker-form, it appears also wrong. But this occurs only if the Language in "my preferences" is set to German. So, English and French works well. See the screenshot on . Contrary, the timpicker-form works well for all languages. This behaviour occurs only since the last upgrading of some extensions, but I don't now exactly of which one. Actually, this is our installation: . Thanks for help! Lugant (talk) 23:08, 31 October 2012 (UTC)
- Sorry for this typo: in the text above, "31/10/2012" should be "2012/10/31" since this is the only accepted format. The described problem still occurs. Lugant (talk) 23:48, 31 October 2012 (UTC)
- Hi Lugant,
- I think you caught a version with an error in the German translations. Sorry about that. To fix it please find the file SemanticFormsInputs.i18n.php. There around line 240 you should find the German translations of the dateformat. Please fix them so they look like this:
'semanticformsinputs-dateformatlong' => 'd. MM yy', 'semanticformsinputs-dateformatshort' => 'dd.mm.yy',
- Alternatively you can use the current development version (https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/SemanticFormsInputs.git;a=snapshot;h=refs/heads/master;sf=tgz) which should be stable.
- Cheers, F.trott (talk) 07:50, 1 November 2012 (UTC)
Slashes
Dates are stored like this YYYY/MM/DD. What is the best way to store this date as an ISO-formatted date (YYYY-MM-DD) in the template for this form?
[[Has start date::{{{Start date|}}}]]
I tried #formatdate/#dateformat but didn't get it to work.
[[Has start date::{{#formatdate:{{{Start date|}}}|ISO 8601}}]]
If it is not possible to store the date this way: Is it possible to display dates as YYYY-MM-DD?
Sorry, I don't know any solution. Martinwiss (talk) 23:45, 26 November 2012 (UTC)
- Used:
- Martinwiss (talk) 23:53, 26 November 2012 (UTC)
[[Has start date::{{#replace:{{{Start date|}}}|/|-}}]]
- You could also use the #time function fropm the ParserFunctions extension:
[[Has start date::{{#time:Y-m-d|{{{Start date|}}}}}]]
see Help:Extension:ParserFunctions#.23time F.trott (talk) 07:33, 27 November 2012 (UTC)
datetimepicker is not supported in multiple-instance templates
Placing a datatimepicker field inside a multiple-instance template does not seem to be supported: When modifying the date of any of the added instances, it always updates the value of the first one. http://scratchpad.referata.com/wiki/Form:Datetimepicker (to verify behavior copy in a site with Semantic Forms Inputs installed) Xavier Atero (talk) 18:12, 8 December 2012 (UTC)
- I have a problem like this.
- If the form with multiple instance has more than one datepicker, only the first can be used. Fernando Carpani (talk) 13:28, 17 December 2012 (UTC)
- Menuselect also not supported in multiple-instance templates. It prints the menu structure instead of creating a menu. Protnet (talk) 20:36, 27 December 2012 (UTC)
- Does the development version work?
- I meant to release that for a while now, but if it is still buggy, there is probably no point. F.trott (talk) 20:48, 14 January 2013 (UTC)
- I just tested this with the current 0.7 alpha (30d00f0) for the datepicker input format. The problem is still persistent. A fix would be cool. [[kgh]] (talk) 21:59, 24 January 2013 (UTC)
- Just tried it again using SF 2.5.2 (latest development version) and MW 1.20 and MW 1.22alpha (latest development version). It worked just fine for both menuselect and datepicker. F.trott (talk) 19:57, 9 May 2013 (UTC)
- I have a similar issue:
- If a page is created (saved for the first time) the input of the datetimepicker field is not saved. If you edit the page (saved for the second time) the datetimepicker field is saved. This is strange...
- My versions: MW 1.19.7, Semantic Forms 2.5.2, Semantic Forms Inputs 0.7
- Any idea what causes the bug and how to fix it? Stefahn (talk) 00:18, 12 June 2013 (UTC)
- I have a similar issue:
- Just tried it again using SF 2.5.2 (latest development version) and MW 1.20 and MW 1.22alpha (latest development version). It worked just fine for both menuselect and datepicker. F.trott (talk) 19:57, 9 May 2013 (UTC)
- I just tested this with the current 0.7 alpha (30d00f0) for the datepicker input format. The problem is still persistent. A fix would be cool. [[kgh]] (talk) 21:59, 24 January 2013 (UTC)
- Menuselect also not supported in multiple-instance templates. It prints the menu structure instead of creating a menu. Protnet (talk) 20:36, 27 December 2012 (UTC)
Disable selecting dates from future
Need an option to disable future dates selection in datepicker. Vlsergey (talk) 12:51, 20 December 2012 (UTC)
Datepicker: Format in Form ok but saved value displayed in wrong format
Dear all,
I'm using the Datepicker from Input formats in a german installation. In the Form I defined "date format=dd.mm.yy" and when using the picker everything is fine. But after saving the form data (I understand that the dates are saved in format YYYY/mm/dd anyway) and calling the result wiki site the date is also shown in YYYY/mm/dd format.
The strange thing is that I already have a similar setup of a Form that is also utilizing the datepicker and this works perfectly well. The date format during entering/editing in the datepicker is in dd.mm.yy format and after saving the dates on the result wiki page are also displayed in the correct dd.mm.yy format.
I could not find any differences regarding the date form fields and template definitions in both cases - therefore I don't have a clue what is going wrong here...
Does anybody have some suggestions?
Many thanks! Sochin67 (talk) 15:40, 22 March 2013 (UTC)
- You should use the #time parser function from Extension:ParserFunctions. I don't know, why one wiki works while the other doesn't. Look at the source of the wiki pages to see if they really are the same. F.trott (talk) 20:35, 26 March 2013 (UTC)
- The help states, that one can only format the field in the form, but the value send to the template is alsway YYYY/mm/dd, for easy storage. Well, I find it not easy in any case, for now I have to change the display of the value at every instance again, which is all, but easy....
- Would be nice, if one could globally, or per property, define a standard output format. Heinrich krebs (talk) 13:24, 12 May 2014 (UTC)
- The values are formatted by a form, so it is not necessary to change each and every page. Just change the form (format the date using the #time parser function). F.trott (talk) 13:33, 12 May 2014 (UTC)
- Could you post an example, please ?
- I edited the template, that is filled by the form, so the values were reformatted to the way I want them to be, that kinda works... Still, I find it not elegant, and can't see the reason, why the format in the form isn't the same as the format sent to the template and ultimately is stored in the property. Heinrich krebs (talk) 15:23, 12 May 2014 (UTC)
- Yes, sorry, editing the template is what I meant.
- The problem with other date formats is, that they are ambiguous and may not be interpreted correctly (or not recognized at all) by SMW. So you should store the date in the property in the yyyy/mm/dd format and display it in whatever format you prefer using the #time function. F.trott (talk) 15:27, 12 May 2014 (UTC)
- But, that isn't elegant and not easily communicated to everyone who writes templates. I really would like a uses standard output:: system property, that I can use on a date property page, like has type::date to define the way it is presented.
- Besides, the german way of presenting dates, with 2 digits for day, dot, two digits for month, dot, and for digits for year worked fine and is accepted by SMW. Heinrich krebs (talk) 10:09, 13 May 2014 (UTC)
- I am open for patches. :)
- See or Gerrit/Getting_started F.trott (talk) 10:25, 13 May 2014 (UTC)
- I have the same problem: dd.mm.yy is displayed as yy/mm/dd -.- 46.140.22.222 15:17, 1 July 2014 (UTC)
- The values are formatted by a form, so it is not necessary to change each and every page. Just change the form (format the date using the #time parser function). F.trott (talk) 13:33, 12 May 2014 (UTC)
Menuselect
The Menuselect input type is depending on the Semantic TreeView extension. Are there plans to further support this input type or will it be phased out? I guess a note about this should be on this extension's page. Cheers [[kgh]] (talk) 19:09, 26 March 2013 (UTC)
- Semantic TreeView is IMHO not maintainable. Instead I improved the tree format of Extension:SemanticResultFormats. Guess I should also update the menuselect documentation, F.trott (talk) 20:30, 26 March 2013 (UTC)
- Yeah, that's why I asked. :) Cheers [[kgh]] (talk) 21:41, 26 March 2013 (UTC)
- Would absolutely love to see some syntax using the new tree format! 72.227.239.207 16:45, 13 April 2013 (UTC)
- I have got an other question abou menuselect:
- is it possible to select a value the type comma and selcet a second value? Becau in my case the first value is always been overwritten!
- Thanks for help. Zym (talk) 13:31, 18 April 2013 (UTC)
- Sorry, it is not possible to create a comma separated list with menuselect. F.trott (talk) 13:40, 18 April 2013 (UTC)
- Thank you for the fast answer!
- What do you recommend instead? More multiselcet fields in a row mapping the same Property? Or maybe change the JavaScript of multiselect? If yes: where? Zym (talk) 13:48, 18 April 2013 (UTC)
- You could try some other input type, e.g. the twolistboxes input type available in the development version of the extension. You could of course also have several inputs or use a multiple template form. If you want to patch menuselect, have a look at the libs/menuselect.js file. F.trott (talk) 07:26, 19 April 2013 (UTC)
- If I put more multiselctfields in a row for the same property the last textfield overwrites the others. So I will try to change the libs/menuselect.js file. Zym (talk) 12:05, 22 April 2013 (UTC)
- Ok, First sucess.
- Line 219-227 was:
- // clicked list item
- .mousedown( function() {
- var content = jQuery( this ).children( "table" ).find( ".cont" );
- // set visible value and leave input
- inputShow
- .attr( "value", content.text() )
- .blur();
- I changed to:
- // clicked list item
- .mousedown( function() {
- var content = jQuery( this ).children( "table" ).find( ".cont" );
- if(inputShow.val())
- {var mycontent=inputShow.val()+','+content.text();}
- else
- {var mycontent=content.text();}
- // set visible value and leave input
- inputShow
- .attr( "value", mycontent)
- .blur();
- But after clicking "Save" the last value is taken! What do I do wrong? what's missing? Zym (talk) 12:51, 23 April 2013 (UTC)
- Thank you for your help!
- I made some changes from line 219-246.
- Origin was:
// clicked list item
- .mousedown( function() {
- var content = jQuery( this ).children( "table" ).find( ".cont" );
- // set visible value and leave input
- inputShow
- .attr( "value", content.text() )
- .blur();
- // set hidden value that gets sent back to the server
- var link = content.children( "a" );
- // if content is link
- if ( link.length == 1 ) {
- // use title set by MW
- jQuery( "#" + inputID ).attr( "value", link.data( "title" ) );
- } else {
- // just use text of list item
- jQuery( "#" + inputID ).attr( "value", content.text() );
- }
- return false;
} );
- Now my code:
// clicked list item
- .mousedown( function() {
- var content = jQuery( this ).children( "table" ).find( ".cont" );
- if(inputShow.val())
- {var mycontent=inputShow.val()+','+content.text();}
- else
- {var mycontent=content.text();
- }
- // set visible value and leave input
- inputShow
- .attr( "value", mycontent)
- .blur();
- // set hidden value that gets sent back to the server
- var link = content.children( "a" );
- // if content is link
- if ( link.length == 1 ) {
- // use title set by MW
- jQuery( "#" + inputID ).attr( "value", link.data( "title" ) );
- } else {
- // just use text of list item
- jQuery( "#" + inputID ).attr( "value", inputShow.val() );
- }
- return false;
} );
- It works ;-) Zym (talk) 13:05, 23 April 2013 (UTC)
- Just an other idea: Could it possible to define the behavier in the form with something like:
- field|foo|input type=menuselect
- |structure=...
- |behavier=add/overwrite
- But I'm not so much into php to change this. Zym (talk) 13:25, 23 April 2013 (UTC)
- I'll have to think about it. Could you raise an enhancement bug on https://bugzilla.wikimedia.org ? F.trott (talk) 13:49, 23 April 2013 (UTC)
- I did:
- https://bugzilla.wikimedia.org/show_bug.cgi?id=47555 Zym (talk) 13:09, 24 April 2013 (UTC)
- I'll have to think about it. Could you raise an enhancement bug on https://bugzilla.wikimedia.org ? F.trott (talk) 13:49, 23 April 2013 (UTC)
- If I put more multiselctfields in a row for the same property the last textfield overwrites the others. So I will try to change the libs/menuselect.js file. Zym (talk) 12:05, 22 April 2013 (UTC)
- You could try some other input type, e.g. the twolistboxes input type available in the development version of the extension. You could of course also have several inputs or use a multiple template form. If you want to patch menuselect, have a look at the libs/menuselect.js file. F.trott (talk) 07:26, 19 April 2013 (UTC)
- Sorry, it is not possible to create a comma separated list with menuselect. F.trott (talk) 13:40, 18 April 2013 (UTC)
Javascript error using input type=datapicker
I've installed SFI development version on MW 1.19 and SMW 1.7 and SF 2.5.2.
In the form I use:
{{{field|Startdatum gepland|property=Startdatum gepland|input type=datepicker}}}
It appears a textbox in the form and i get the followin Javascript error:
Uncaught TypeError: Cannot read property 'regional' of undefined TestCluster:399 (anonymous function) TestCluster:399 fire load.php:14 self.fireWith load.php:15 jQuery.extend.ready load.php:6 DOMContentLoaded load.php:12
Toine Schijvenaars (talk) 18:24, 28 May 2013 (UTC)
Support default=now
For datepicker please! David Mason (talk) 16:19, 7 July 2013 (UTC)
- Raised a formal bug on this: https://bugzilla.wikimedia.org/show_bug.cgi?id=61363 F.trott (talk) 08:42, 14 February 2014 (UTC)
jQuery data undefined error and 2 Listbox Appearance
I installed this extension mainly for the two listboxes but couldnt get it to work properly.
1) In my semantic form, I created a field with input type=two listboxes and when I preview this created form, this is showing this error:
ext.semanticforms.main: TypeError: jQuery(...).data(...) is undefined
The above error shows only when I preview the form in the "CreateForm" page but it seems to work when I actually try to fill-in the form. I am using MW 1.21 and I downloaded the development version of your extension from Git.
2) The listbox display seems different in the picture you had given in your extension page to what I see on my installed version. For example, the 2 listboxes are right next to each other but in your picture it is displayed nicely since the listboxes are separated and displayed with an arrow in between them. How can I get that appearance for these 2 listboxes? 117.216.40.47 11:29, 4 September 2013 (UTC)
- Hi! I'm the developer of two listboxes, I'll try to help. First please try to add &debug=true to the URL and provide the full error message with problematic line numbers. Katkov Yury (talk) 11:51, 4 September 2013 (UTC)
- Thank you Katkov.. Thank you for developing this input method. :)
- Okay, I tried adding &debug=true to the URL but nothing happens. Could it be that this error only shows when I click on the "Preview" button when I am Editing the Form and not in the actual URL? For instance, when I add &debug=true directly to the form url like www.url.com/wiki/index.php/Form:xyzForm&debug=true, then it shows the "There is currently no text in this page. You can search for this page title in other pages, search the related logs, or edit this page" message since its trying to create a new page. When I click on Edit Form, and then click preview, that is the time the error shows. So when I try adding &debug=true to the URL that shows when viewing the preview like this: wiki/index.php?title=Form:xyzForm&action=submit&debug=true or wiki/index.php?title=Form:xyzForm&debug=true&action=submit, then it just shows the form edit page without any previews or errors. So sorry couldnt be of help there since I couldnt get the full error message with problematic line numbers. Are you maybe able to reproduce this by trying to edit the form that has the 2 listboxes and then click on Preview button? The error message shows in 2 pop-up boxes when the preview form page is loaded:
- Dialog 1 says: "ext.semanticforms.main: TypeError: jQuery(...).data(...) is undefined" with OK button,
- Dialog 2 says: "ext.semanticforms.main: TypeError: jQuery(...).data(...) is undefined" along with a checkbox in the next line that says "Prevent this page from creating additional dialogs" and then the OK button.
- But like I said before, although these errors shows when I preview the form edit page (note it happens only when I edit the actual form and not the article that was created based on the form), the form actually works when creating an article using it. So not sure what could be the cause...
- And, any suggestions on how I can style these listboxes like I mentioned in (2) above? Are the listboxes showing close to each other because of the other error or is this how its supposed to be? Do you have a working example by any chance?
- Cheers! Alien Time (talk) 13:19, 4 September 2013 (UTC)
- Can you open it in Chrome and press F12? Pick Console in the tabs and tell what is said there with debug=true. Katkov Yury (talk) 13:36, 4 September 2013 (UTC)
- ah...This is what it says:
- TypeError: list[firingIndex] is undefined
- load.p...131930Z (line 12)
- ....split(core_rspace),function(_,flag){object[flag]=true;});return object;}jQuery....
- And when I click on Line 12, it highlights this:
- function doScrollCheck(){if(!jQuery.isReady){try{top.doScroll("left");}catch(e){return setTimeout(doScrollCheck,50);}jQuery.ready();}})();}}}return readyList.promise(obj);};jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(i,name){class2type["[object "+name+"]"]=name.toLowerCase();});rootjQuery=jQuery(document);var optionsCache={};function createOptions(options){var object=optionsCache[options]={};jQuery.each(options.split(core_rspace),function(_,flag){object[flag]=true;});return object;}jQuery.Callbacks=function(options){options=typeof options==="string"?(optionsCache[options]||createOptions(options)):jQuery.extend({},options);var memory,fired,firing,firingStart,firingLength,firingIndex,list=[],stack=!options.once&&[],fire=function(data){memory=options.memory&&data;fired=true;firingIndex=firingStart||0;firingStart=0;firingLength=list.length;firing=true;for(;list&&firingIndex<firingLength;firingIndex++){if(list[firingIndex].apply(data[0],data[1]) Alien Time (talk) 14:40, 4 September 2013 (UTC)
- Another time I reloaded this error showed up too (although most of the time, it shows error in line #12 except for this time):
- TypeError: jQuery(...).data(...) is undefined
- load.p...3128Z&* (line 32)
- ...noexecute){var input=this;jQuery(function(){initFunction(input.attr("id"),param)...
- Line 32 is this:
- initFunction,param,noexecute){if(!this.attr("id"))return this;if(!jQuery("#sfForm").data("SemanticForms")){setupSF();}if(!jQuery("#sfForm").data("SemanticForms").initFunctions[this.attr("id")]){jQuery("#sfForm").data("SemanticForms").initFunctions[this.attr("id")]=new Array();}jQuery("#sfForm").data("SemanticForms").initFunctions[this.attr("id")].push({initFunction:initFunction,parameters:param});if(this.closest(".multipleTemplateStarter").length==0&&!noexecute){var input=this;jQuery(function(){initFunction(input.attr("id"),param)});}return this;};jQuery.fn.SemanticForms_unregisterInputValidation=function(){var sfdata=jQuery("#sfForm").data("SemanticForms");if(this.attr("id")&&sfdata){for(var i=0;i<sfdata.validationFunctions.length;i++){if(typeof sfdata.validationFunctions[i]!=='undefined'&&sfdata.validationFunctions[i].input==this.attr("id")){delete sfdata.validationFunctions[i];}}}return this;};jQuery.fn.SemanticForms_unregisterInputInit=function(){if(this.attr("id")&&jQuery( Alien Time (talk) 14:47, 4 September 2013 (UTC)
- hi Katkov, hope i am not being impatient by asking for an update on this error? And how do i style the listboxes by increasing its width, etc... i tried the size parameter and the class but cant change its appearance.. sorry, my form is ready to go once i figure this out. :) Alien Time (talk) 07:18, 5 September 2013 (UTC)
- helas, the styling is not yet supported :( Katkov Yury (talk) 13:34, 6 September 2013 (UTC)
- hi Katkov, hope i am not being impatient by asking for an update on this error? And how do i style the listboxes by increasing its width, etc... i tried the size parameter and the class but cant change its appearance.. sorry, my form is ready to go once i figure this out. :) Alien Time (talk) 07:18, 5 September 2013 (UTC)
- Can you open it in Chrome and press F12? Pick Console in the tabs and tell what is said there with debug=true. Katkov Yury (talk) 13:36, 4 September 2013 (UTC)
box size for "two listboxes"
It would be nice if we can specify the size of the two listboxes rather than playing with css... Thanks in advance. 195.101.137.127 16:33, 31 October 2013 (UTC)
Forms gone
Hello team,
After a dozen upgrades and a fresh mediawiki install I've lost all my forms. I unable to locate 'm in backups. Where are the forms saved to?
Thanks,
T 85.151.34.44 19:26, 18 November 2013 (UTC)
Conditional Regular Expression
Hi I'm sure I'm missing something simple, but here's the problem: I have some optional fields that a user can elect to fill out or not, but when they are filled out they need to be limited to the pattern they can enter. But if I set a regular expression for that field it shows an error if it is not filled out. The mandatory setting in Semantic Forms recognizes if statements -- is there away with semantic inputs to write a regular expression that's conditional? I'm sure I'm over looking something simple, because that's generally the case, but any guidance here would be helpful. Thanks Christharp (talk) 04:01, 12 December 2013 (UTC)
- The input is matched against a JavaScript style regexp. Maybe this helps: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
- In principle it should be as easy as wrapping your whole regexp in parenthesis and appending a question mark. F.trott (talk) 12:57, 16 December 2013 (UTC)
Sort order for "two listboxes"?
Is it possible to force a sort of the contents of Two Listboxes? I've tried going back and changing the order of the allowed values for my property, but the sort order of the listboxes never changes. Thanks. Lsilverman (talk) 03:33, 28 January 2014 (UTC)
- I think it should be possible to do that using the plain "values" parameter (i.e. not one of the "values from..." parameters). You could try using an ask query, something like
values={{#ask: ... }}
. Of course you then face the problem of sorting that ask. - If you already specify allowed values with your properties the simplest solution might be to just explicitly list the allowed values by hand in your form. Or - if you have many forms - to put the list of allowed values in a template. All not very comfortable or elegant, I know. F.trott (talk) 16:16, 28 January 2014 (UTC)
- Am I correct that specifying a preferred sort order isn't supported on any of the input types? Lsilverman (talk) 16:53, 28 January 2014 (UTC)
pipe characters in input text
hello there i have a form where users can input text (paste e-mails that can contain all kinds of characters) I was able to escape all wiki markup characters using #replaceset function but there is one problematic one, which is pipe (|). Code datatype cannot do with it anything either. Any ideas how to escape pipes? 94.246.136.191 17:52, 23 April 2014 (UTC)
- It might be worthwhile for those text emails to go into a form "section" (using the {{{section}}} tag), instead of a form "field" - there's a lot more flexibility there. Yaron Koren (talk) 19:48, 23 April 2014 (UTC)
Menuselect - can you alter the drop-down menu width?
Menuselect allows you to set the maxlength of the input, and the size of the field itself.
However, the drop-down menu seems to be set at about 20 characters wide. It means that, with long menu items, they wrap-around and you have a very long, thin, drop-down menu for only about 20 items.
Would it be possible for it to set the menu width to the width of the longest entry?
Alternatively, is there a way of setting the drop-down length wider?
Fustbariclation (talk) Fustbariclation (talk) 09:14, 30 April 2014 (UTC)
- Coincidently there is a current discussion on this on the smw user mailing-list. Cheers [[kgh]] (talk) 12:21, 30 April 2014 (UTC)
- Thank you for the pointer - but it's not a coincidence - at least it is, but not an accidental one because the question there is also from me.
- I thought I'd put the answer here for anybody coming later:
- It turns out that this is a bug with Safari (version 7.0.3) - the menu works perfectly well on Firefox (version 28.0). That is, the drop-down menu is wide enough and there is no wrap-around, so it looks fine.
- I've submitted a bug report to Apple about the problem with Safari. Fustbariclation (talk) 03:12, 2 May 2014 (UTC)
- I thought that it might be you, but one never knows. Just yesterday me and another user posted the very same question to something out of the blue. So ... :) I am glad that it was possible to track down the cause of the issue and I hope that Safari does its part soon, too. Cheers [[kgh]] (talk) 07:12, 3 May 2014 (UTC)
SFI not working -- Giving error
Setup
MediaWiki | 1.21.2 |
---|---|
PHP | 5.3.17 |
MySQL | 5.5.33 |
Lua | 5.1.5 |
Semantic Forms | Version 2.7 |
Semantic Forms Inputs | Version 0.7 |
I have tried SFI 0.9alpha with the same results.
Issue
I keep getting the following error:
Ext.semanticforms.main: TypeError: Cannot read property ‘initFunctions’ of undefined
I have tried different browsers and different accounts, updated extension file permissions, etc with no luck. When I use F12 in Chrome is makes a reference to the Vector skin but I'm not sure what to make of it. Can anybody help me?
Thanks. Clifford 15:41, 30 May 2014 (UTC)
"datepicker"
for "input type=date" works the next:
date
but, for "input type=datepicker" does not works "default=now"
how can i do that datepicker field prints the current date? 189.147.159.105 22:22, 4 August 2014 (UTC)
Menuselect Warnhinweis: Eine Teilabfrage enthält eine ungültige Bedingung
Trying to use the MenuSelect https://www.mediawiki.org/wiki/Extension:Semantic_Forms_Inputs#Examples_4 as outlined in the example
{{{field|Part of|input type=menuselect|structure= {{#ask: [[Part of::+]]{{!}} format=tree{{!}} parent=Part of }} }}}
I get the error message: Warnhinweis: Eine Teilabfrage enthält eine ungültige Bedingung the simple example
{{{field|foo|input type=menuselect |structure= * Item 1 ** Item 11 ** Item 12 * Item 2 ** Item 21 ** Item 22 }}}
works as expected. Neither
'''Thema:''' {{{field|Thema|input type=menuselect|structure={{#ask: [[Category:BITPlanStandard]] {{!}} ?nr {{!}} format=tree {{!}} parent=nr {{!}} limit=70 }} }}}
nor
'''Thema:''' {{{field|Thema|input type=menuselect|structure={{#ask: [[Category:BITPlanStandard]] {{!}} format=tree {{!}} parent=nr }} }}}
nor
'''Thema:''' {{{field|Thema|input type=menuselect|structure={{#ask: [[Thema::+]]{{!}} format=tree{{!}} parent=Thema }} }}}
work - all give the same error message.
All these ask queries used on their own work as expected.
Versions:
- MediaWiki 1.23.5 (a80a0a2) 19:06, 13. Okt. 2014
- Semantic Forms 2.8 (8bdcec3) 21:31, 6. Okt. 2014 GPL-2.0+ Ermöglicht Formulare zum Hinzufügen und Bearbeiten semantischer Daten Yaron Koren, Stephan Gambke und andere
- Semantic Forms Inputs 0.9.0 alpha (329a4b7) 19:14, 27. Aug. 2014 GPL-2.0+ Ermöglicht verschiedene zusätzliche Eingabearten für Semantic Forms Stephan Gambke und andere
- Semantic MediaWiki 2.0 GPL-2.0+ Ermöglicht es, das Wiki zugänglicher zu machen – für Menschen und Maschinen (Dokumentation) Markus Krötzsch, Jeroen De Dauw, James Hong Kong und andere
- Semantic Result Formats 1.9 Seppl2013 (talk) 08:12, 14 October 2014 (UTC)
- The example is wrong ... {{!}} should not be used but the verbatim |
- So e.g.:
'''Thema:''' {{{field|Thema|input type=menuselect|structure={{#ask: [[Category:BITPlanStandard]] | format=tree | parent=nr | limit=70 }} }}}
- works. I feel stupid :-) Please fix the example so other's won't get into this feeling, too ... Seppl2013 (talk) 09:08, 14 October 2014 (UTC)
menuselect and datepick acts innormal, seems something wrong with the JS
MediaWiki 1.22alpha (8b6be1c) 1.22wmf21 Semantic Forms (版本2.6) Semantic Forms Inputs (版本0.7)
i have testest the simplest Form, containing only a single {{{field}}}, and copied the example menuselect codes.
after i have saved, i can see the top lev contents with the triangle icons, but the lev2 triangle icons shows up too without text content. When i move mouse on it, nothing pop out.
Another problem with datepicker: the set of icons used to select date occurs twice in the same line, and both function normally.
both 2 problems could turn normal after i do a search,(i am using this form as a query form, so i can search on the same page)
121.33.247.50 04:23, 14 November 2014 (UTC)
- finally, i found that this is the problem of menuselect and queryformlink
- when i use menuselect in a normal form invoked by {{#formlink}} , everything is ok.
- but when i use menuselect in a form invoked by {{#queryformlink}}, then this bug occurs.
- is there anyone can help? thx! Extirpate (talk) 09:03, 15 November 2014 (UTC)
Will this extension be made available though Composer ?
That's pretty much the question: Will this extension be made available though Composer ? Heinrich krebs (talk) 17:22, 3 December 2014 (UTC)
Today button
Hi, in the datepicker.js code the showButtonPanel is 'false' because there seemed to be a bug with the button panel. When I change the showButtonPanel to 'true' however it seems to work fine.
Is it safe to make it 'true' and if it is, could there be a type specific parameter for this? AdSvS (talk) 11:16, 16 December 2014 (UTC)
What about doing a 0.8.0 release?
The last version was officially released in May 2013. In the meantime amongst others the big I18n change catering for new versions of MW has occurred. I guess this will make upgrading easier for people. [[kgh]] (talk) 09:51, 1 February 2015 (UTC)
Datepicker error: Undefined offset: -1 in [...]/extensions/SemanticFormsInputs/includes/SFI_DatePicker.php on line 287
Hello,
I get this datepicker error on two wikis, running on 1.23.1 /SFI 0.9.0 alpha and 1.23.6 / SFI 0.7.
- Undefined offset: 0 in [...]/extensions/SemanticFormsInputs/includes/SFI_DatePicker.php on line 283
- Undefined offset: -1 in [...]/extensions/SemanticFormsInputs/includes/SFI_DatePicker.php on line 287
The corresponding lines in the PHP file are about the minDate and maxDate.
// correct min/max date to the first/last allowed value
if ( !$minDate || $minDate < $enabledDates[0][0] ) {
$minDate = $enabledDates[0][0];
}
if ( !$maxDate || $maxDate > $enabledDates[count( $enabledDates ) - 1][1] ) {
$maxDate = $enabledDates[count( $enabledDates ) - 1][1];
I can acces, fill in and save the form, but would quite like to get rid of the error message. I have taken out the "data format" part, but with no effect. Any ideas what I could do to fix this error? Zabien (talk) 23:01, 2 March 2015 (UTC)
Ubuntu SWM Semantic Form date picker error: jquery.ui.position: Error Module jquery.ui.position has failed dependencies
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I'm having a problem with date picker in a Semantic Form. I'm getting this error message:
jquery.ui.position: Error Module jquery.ui.position has failed dependencies
I've tried to find a solution, but, so far, no luck. Any suggestions?
Ubuntu: 3.16.0-31-generic #43-Ubuntu SMP Tue Mar 10 17:37:36 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
MediaWiki Versions look OK - all current. Fustbariclation (talk) 14:41, 17 March 2015 (UTC)
- No idea. Maybe you could try to set debug=true in the URL and then find the actual trigger of the error using Firebug or the like. F.trott (talk) 21:42, 19 March 2015 (UTC)
Styling for datepicker fields is only applied to mandatory fields in SF 3.2
I noticed that with SF 3.2, the fancy new css applied to input fields is not applied to fields with input type=datepicker (or datetimepicker) unless the field is also set as mandatory. Functionally things are fine. Afraid that's the extent of my ability to help. Lbillett (talk) 15:56, 28 April 2015 (UTC)
- I can confirm this but never got around reporting it. I added the following including some other modification to "MediaWiki:Common.css" to enforce the same appearance for datepickers:
- [[kgh]] (talk) 16:03, 28 April 2015 (UTC)
/* Semantic Forms Inputs */ .hasDatepicker { width: 95px; border: 1px solid #bbb; border-radius: 3px; display: inline-block; margin-left: 0; max-width: 100%; padding: 4px 8px; }
"style module should define its position explicitly" when used with 1.26alpha (776aee4)
RESOLVED | |
Datepicker was fixed and transferred to SemanticForms 3.4.3. It was removed from SFI 0.10. |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
The datepicker input type stopped working under SMW-1.26alpha. The form loads but the datepicker does not. This warning is shown:
Warning: OutputPage::getModuleStyles: style module should define its position explicitly: jquery.ui.datepicker ResourceLoaderFileModule [Called from OutputPage::getModuleStyles in C:\Apache\htdocs\mediawiki\includes\OutputPage.php at line 621] in C:\Apache\htdocs\mediawiki\includes\debug\MWDebug.php on line 300 Warning: OutputPage::getModuleStyles: style module should define its position explicitly: ext.semanticformsinputs.datepicker ResourceLoaderFileModule [Called from OutputPage::getModuleStyles in C:\Apache\htdocs\mediawiki\includes\OutputPage.php at line 621] in C:\Apache\htdocs\mediawiki\includes\debug\MWDebug.php on line 300
In the console:
Uncaught ReferenceError: jQuery is not defined
I can find a lot of references on style module should define its position explicitly
but I don't know how to fix this. There is no SFI_Datepicker.css
in the skins directory. Regards. Felipe (talk) 12:48, 28 September 2015 (UTC)
- For the style module should define its position explicitly the solution is this:
- Go to the skins.json or extension.json file of the skin or extension, which defines the jquery.ui.datepicker module.
- Then in the configuration of that module, add an entry for its position. E.g.
- 88.130.78.137 (talk) 21:27, 24 November 2015 (UTC)
"ResourceModules": { "jquery.ui.datepicker.styles": { "position": "top", "styles": { ...
- What do I do if I get this on a custom skin that does not have a skins.json? CayceP (talk) 09:18, 26 November 2015 (UTC)
- I'm also having the issue with datepicker in MW 1.26.0 and not sure how to fix it, getting these messages in debugger console...
Warning | OutputPage::getModuleStyles: style module should define its position explicitly: ext.semanticformsinputs.datepicker ResourceLoaderFileModule | OutputPage::getModuleStyles |
Warning | OutputPage::getModuleStyles: style module should define its position explicitly: jquery.ui.datepicker ResourceLoaderFileModule | OutputPage::getModuleStyles |
- For anybody else having this problem, it's in resources/Resources.php. This works now.
- 'jquery.ui.datepicker' => array(
- 'position' => 'top',
- 'scripts' => 'resources/lib/jquery.ui/jquery.ui.datepicker.js',
- Project:Support desk/Flow/2015/11#h-MW_1.26:_How_to_fix_"style_module_should_define_its_position_explicitly"_warning-2015-11-27T11:20:00.000Z Kc5vcx (talk) 17:09, 30 November 2015 (UTC)
- Hm, datapicker does also not work for me any more after updating to MW 1.26 (stable). Even the workaround with '''position' => 'top'" does not help. Ralfk (talk) 16:22, 2 December 2015 (UTC)
- Oh, just wait - after a while (even though I restarted Apache and reloaded the form different times) the datepicker appears now. The workaround seemed to fix it in deed. Ralfk (talk) 16:46, 2 December 2015 (UTC)
- I'm actually still having intermittent issues with mine too, in cases with multiple instances some work and some don't. In chrome inspector I see this error "Uncaught ReferenceError: jQuery is not defined", looking at the html source it doesn't appear that the jquery script includes are at the very top of the list. Kc5vcx (talk) 03:13, 7 December 2015 (UTC)
- I submitted the bug to phabricator https://phabricator.wikimedia.org/T121964 Kc5vcx (talk) 04:44, 19 December 2015 (UTC)
- Datepicker was fixed and transferred to SemanticForms 3.4.3. It was removed from SFI 0.10. F.trott (talk) 23:39, 8 February 2016 (UTC)
- Updated and after a quick check looks fixed, thanks! Kc5vcx (talk) 03:53, 13 February 2016 (UTC)
regexp input type is not working
RESOLVED | |
Regexp was fixed and transferred to SemanticForms 3.4.3. It was removed from SFI 0.10. |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
The regexp input type show here Extension:Semantic Forms Inputs#Regular expression filter is not working.
Attached is the error that I encountered when trying to save '0' integer
And the error message above can't be removed since the form cannot be resubmitted when the 'Save page' is click.
Here's the field definition:
{{{field|dividend_most_recent|placeholder=Most Recent|input type=regexp|regexp=/^\d*$/|message=Please enter decimal/numbers!|base type=regexp|base prefix=filter2|filter2.regexp=/^.{0,10}$/|filter2.message=Please enter only up to 10 digits!|filter2.base type=regexp}}}
Please help Ace.philscan (talk) 08:07, 12 November 2015 (UTC)
- This has been reported a while back, see: T97023. Wich version of MW are you using? Felipe (talk) 08:51, 12 November 2015 (UTC)
- These are the details of the installation.
- == Installed software ==
Product | Version |
---|---|
MediaWiki | 1.26alpha |
HHVM | 3.9.0-dev (srv) |
MySQL | 5.6.19-0ubuntu0.14.04.1 |
LuaSandbox | 2.0.11 |
Lua | 5.1.5 |
Elasticsearch | 1.7.1 |
- Also the Semantic Versions, thanks.
- == Installed extensions ==
Semantic extensions | ||||
---|---|---|---|---|
Extension | Version | License | Description | Authors |
Semantic Forms Inputs | 0.9.0 alpha (3ad526a)04:15, 20 August 2015 | GPL-2.0+ | Additional input types for Semantic Forms | Stephan Gambke and others |
Semantic MediaWiki | 2.2.2 | GPL-2.0+ | Making your wiki more accessible - for machines and humans (online documentation) | Markus Krötzsch, Jeroen De Dauw, James Hong Kong and others |
SemanticRating | 2.2 (5cb7499)21:55, 19 August 2015 | MIT | Allows users to rate items with stars | Cindy Cicalese and others |
- regex input type seems broken in MW 1.26.0 too, doesn't do any checking. Kc5vcx (talk) 14:44, 30 November 2015 (UTC)
- For me (on mw 1.25.5), it works if I omit the enclosing slashes. So instead of writing
{{{field|foo|input type=regexp|regexp=/^[0-9A-Za-z ]+$/}}}
- I use
{{{field|foo|input type=regexp|regexp=^[0-9A-Za-z ]+$}}}
-- Tobias (talk) 21:17, 1 February 2016 (UTC)- Regexp was fixed and transferred to SemanticForms 3.4.3. It was removed from SFI 0.10. F.trott (talk) 23:37, 8 February 2016 (UTC)
- Thank you. It works :).. Ace.philscan (talk) 03:53, 16 March 2016 (UTC)
Use of wfMsg was deprecated in MediaWiki 1.21.
RESOLVED | |
Migrated. |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Also, FYI...
Use of wfMsg was deprecated in MediaWiki 1.21.- SFI_DatePicker.php line 91 calls wfMsg()
- SFI_DatePicker.php line 45 calls SFIDatePicker::setup()
- SF_FormInput.php line 329 calls SFIDatePicker->__construct()
- - line - calls SFFormInput::getHTML()
- SF_FormPrinter.php line 2027 calls call_user_func_array()
- SF_FormPrinter.php line 1475 calls SFFormPrinter->formFieldHTML()
- SF_AutoeditAPI.php line 886 calls SFFormPrinter->formHTML()
- SF_AutoeditAPI.php line 115 calls SFAutoeditAPI->doAction()
- SF_FormEdit.php line 92 calls SFAutoeditAPI->execute()
- SF_FormEditAction.php line 205 calls SFFormEdit->printForm()
- SF_FormEditAction.php line 27 calls SFFormEditAction::displayForm()
- MediaWiki.php line 458 calls SFFormEditAction->show()
- MediaWiki.php line 255 calls MediaWiki->performAction()
- MediaWiki.php line 682 calls MediaWiki->performRequest()
- MediaWiki.php line 476 calls MediaWiki->main()
- index.php line 41 calls MediaWiki->run()
input type=category
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
this is an option in creating a form, though the value is not rendered as a text field in any form i have created. the markup appears instead. was this ever a viable option?
I wish to use SematicForms to select from a group of categories, and add the category to the page. Some thing (talk) 19:53, 12 January 2016 (UTC)
- "category" comes from Semantic Forms, not Semantic Forms Inputs - you should ask about it on the SF talk page. Yaron Koren (talk) 20:39, 18 January 2016 (UTC)
SFIDatePicker missing
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Because datepicker is moved to Semantic Forms, date time picker (SFI_DateTimePicker.php) can no longer call SFIDatePicker 104.236.47.218 (talk) 22:32, 9 February 2016 (UTC)
- Normally this should not be a problem. The class is still available. Did you update SemanticForms? F.trott (talk) 22:35, 9 February 2016 (UTC)
- Yes both SemanticForms and SemanticFormInputs are updated via git clone.
- However command "grep -r SFIDatePicker ." under both SemanticForms and SemanticFormInputs directories return only calls to the class in SFI_DateTimePicker.php, no class definition.
- [root@server1 extensions]# git clone https://git.wikimedia.org/git/mediawiki/extensions/SemanticForms.git
- [root@server1 extensions]# git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/SemanticFormsInputs.git
- [root@server1 extensions]# grep -r SFIDatePicker .
- ./SemanticFormsInputs/includes/SFI_DateTimePicker.php: $this->mDatePicker = new SFIDatePicker( $this->mInputNumber . '_dp', $dateString, $this->mInputName, $this->mIsDisabled, $this->mOtherArgs );
- ./SemanticFormsInputs/includes/SFI_DateTimePicker.php: SFIDatePicker::getParameters(),
- [root@server1 extensions]# 104.236.47.218 (talk) 22:55, 9 February 2016 (UTC)
- You are right. The class was renamed SFDatePicker when it was moved to SF. F.trott (talk) 23:03, 9 February 2016 (UTC)
- In fact the new name is SFDatePickerInput.
- I just fixed it. F.trott (talk) 23:10, 9 February 2016 (UTC)
- Thank you.
- I thinks it is "SFDatePickerInput".
- Also after replacing SFIDatePicker with SFDatePickerInput in SFI_DateTimePicker.php, the form starts to render without any fatal php errors, but now pickers wont work and there is a javascript error, something to do with "window.SFI_DTP_init" (I am not good with javascript). Only 2 text input fields appear on the form.
- Also there is a php notice now:
- PHP Notice: Undefined property: SFISettings::$datePickerDisableInputField 104.236.47.218 (talk) 23:14, 9 February 2016 (UTC)
- I'll look at it tomorrow. F.trott (talk) 23:19, 9 February 2016 (UTC)
- I put in a fix that unbroke it for me. Could you give it a try? F.trott (talk) 21:28, 10 February 2016 (UTC)
- It works.
- Thank you 104.236.47.218 (talk) 22:14, 10 February 2016 (UTC)
datepicker doesn't render a popup calender, renders a basic input field
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Using input type=datepicker on a form to render a popup calendar results and a plain text field is rendered.
Versions:
MediaWiki:1.26.2
SemanticForms: 3.4.2-alpha
SemanticFormsInputs: 0.10.1
Am I missing something in my setup? UlaniBlue (talk) 00:17, 13 February 2016 (UTC)
- Datepicker is now part of SemanticForms, so no need for SemanticFormsInputs anymore (unless you have other inputs from SFI). Anyway, if you have pulled the latest SemanticForms it should work. Do you get any JavaScript errors? Are other inputs using JS working? Is your wiki public? F.trott (talk) 00:28, 13 February 2016 (UTC)
- Hi,
- As far as I can tell, I have the latest versions of the extensions installed.
- The date time input works, just not datepicker.
- Yes, it's public. You can see the problem here http://lnk2.biz/1Xqt2VT
- I'm a little perplexed. UlaniBlue (talk) 22:02, 13 February 2016 (UTC)
- Hmm, I do not have a login, so cannot edit. Anyway, it works for me with the latest SF (which is 3.4.3-alpha) and SFI (0.10.1). There were some issues fixed in SF 3.4.3-alpha, so there is a good chance that upgrading it will fix the problem. F.trott (talk) 08:54, 15 February 2016 (UTC)
input type=categories
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
MediaWiki | 1.26.2 |
Semantic Forms 3.6-alpha
Semantic MediaWiki | 2.3.1 |
Semantic Forms Inputs | 0.10.0 |
I updated to the latest release of Semantic Forms and Semantic Forms Inputs.
I’m using |{{{field|cat|input type=categories|top category=category|hideroot}}}
It used to give me a list of categories with checkboxes for each category, now it creates a bulleted list.
Is there another way of getting the checkboxes back? Legaulph (talk) 16:36, 14 March 2016 (UTC)
Call to a member function registerInputType() on null
RESOLVED | |
Semantic Forms Inputs was completely obsoleted with version 3.7 of Semantic Forms. |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
After updating SemanticForms from 3.6 to 3.7 I get the following error:
PHP Fatal error: Call to a member function registerInputType() on null in /srv/www/extensions/SemanticFormsInputs/SemanticFormsInputs.php on line 131
MW: 1.27.1
SFI: master RacingRalf (talk) 07:28, 12 September 2016 (UTC)
- SFI was discontinued and the most important inputs merged with SF 3.4.3. F.trott (talk) 07:30, 12 September 2016 (UTC)
- Ah, hehe, ok.
- Maybe mention this somewhere?
- Thx! RacingRalf (talk) 07:54, 12 September 2016 (UTC)
- Just done on the extension page. :) F.trott (talk) 07:56, 12 September 2016 (UTC)
- I made this even more obvious and added explicit version information. I hope this is ok. [[kgh]] (talk) 08:27, 12 September 2016 (UTC)
- I must add that I do not get the described issue with SF 3.7 however I now get it with PF 4.0 - still the conclusion remains the same. [[kgh]] (talk) 22:03, 1 November 2016 (UTC)
Open tasks on phabricator
@F.trott There are some tasks still open on Phabricator. I guess it will be best to reassign them to the Page Forms extension if applicable or decline them.
I am going to archive the extension's page since it make not much sense to have it because MW 1.23 is not de facto out of support. [[kgh]] (talk) 16:21, 12 June 2017 (UTC)
- Agreed. I'll look through the issues and re-assign or close them. F.trott (talk) 17:28, 12 June 2017 (UTC)
- Ok, done.
- @Yaron Koren, these are all from when we still used Bugzilla. Feel free to ignore. F.trott (talk) 19:31, 12 June 2017 (UTC)
- @F.trott - thanks. Who knows, maybe one or more of them are still an actual bug. Yaron Koren (talk) 19:59, 12 June 2017 (UTC)
User input validation on Form
Is it possible to do user input validation using a Form? E.g. if the property is a simple string, I want to ensure a user enters a string, otherwise prompt an error e.g. "Please enter some value".
I attempted to some basic validation using regexp input type but this wont work for other scenarios such as using a listbox or dropbox value.
Any suggestions? 148.64.15.127 (talk) 14:42, 13 July 2021 (UTC)