Extension talk:Semantic Forms Inputs/LQT Archive 1

If you want to leave a comment or question, please append it to the very end of this page.

Datapicker trouble
Hi,

Very helpful extension and thanks. Once installed I use the input type= data picker.It showed up in the form but it wont let me pick the dates, if I clicked on it.any idea why?

thanks


 * No, not offhand. Is it somewhere public to have a look at it? --F.trott 06:59, 9 November 2009 (UTC)


 * It's not public. But thanks for your reply..Msevero 01:34, 11 November 2009 (UTC)

Same here
For some reason it won't let me pick the dates, it seems like maybe the javascript is buggy...--Gregra 16:44, 9 February 2010 (UTC)
 * After some debugging, it seems that the Header Tabs extension is causing that bug. Has anyone else encountered this?--Gregra 17:55, 9 February 2010 (UTC)
 * Got it! It seems that you have to use the same YUI version (2.7.0) for both extensions. You should also patch HeaderTabs.php like it says on the extension page. Find:

if ($firsttab) { $style = ''; $firsttab = false; }else { $style = ' style="display:none"';}$tabhtml .= ' '.$tab['tabcontent'].' '; and replace it by: $tabhtml .= ' '.$tab['tabcontent'].' ';

--Gregra 18:13, 9 February 2010 (UTC)

Problem when using datepicker with multiple instance templates
The datepicker function seems to work great until I click on the "Add another" button. I'm using the form code below: Week: Number of hours: Action: This is currently on a private wiki, although I can move it to a public one if necessary. Thanks in advance for any help. Mr3641 18:35, 29 September 2010 (UTC)


 * The simpledatepicker alas does not support usage in multiple-instance forms, sorry. An improved version is in development (in fact, it is finished), but it depends on an update to Semantic Forms. --F.trott 17:29, 30 September 2010 (UTC)

Turn off brackets?
Hi. Great calendar! However, I am returning more than one field and it shows brackets around the second item in the calendar. How would I go about removing the brackets so I just have the field content? Thanks! --mitchelln 15:13, 25 February 2010 (UTC)


 * The normal use case would be to define a field of type datepicker. This should yield a string recognizable by SMW as a date value. I'm not sure what you mean by returning more than one field or what the second item in a calendar is. Could you explain in more detail what you want to do? Maybe include your field definition? F.trott 07:26, 26 February 2010 (UTC)

Date and Time picker
Could the datepicker select also the time? It would be very helpful to also have the time selectable so the datetime basic input could be completely replaced. Thanks --Mxhn 13:04, 2 March 2010 (UTC)


 * That is currently not possible. F.trott 15:28, 2 March 2010 (UTC)

More javascript trouble, datepicker not toggling
MW 1.15.1 SMW 1.4.3 SF 1.8 Firefox 3.5.x, Konqueror 4.3.x, IE 7.x, IE 8.x

I do *not* have HeaderTabs installed. When doing any invocation of DatePicker, including a simple invocation with default values such as

I can not get the datepicker to toggle so it's visible.

When I load the page with this form on it, I get a slew of javascript warnings in the Firefox console for the YUI stuff. After doing some surfing I gather these are "normal", and they're only warnings, but here they are:

Warning: Expected declaration but found '*'. Skipped to next declaration. Source File: http://yui.yahooapis.com/2.7.0/build/calendar/assets/skins/sam/calendar.css Line: 7 Warning: Expected declaration but found '*'. Skipped to next declaration. Source File: http://yui.yahooapis.com/2.7.0/build/calendar/assets/skins/sam/calendar.css Line: 7 Warning: Unknown property 'zoom'. Declaration dropped. Source File: http://yui.yahooapis.com/2.7.0/build/calendar/assets/skins/sam/calendar.css Line: 7 Warning: Error in parsing value for 'filter'. Declaration dropped. Source File: http://yui.yahooapis.com/2.7.0/build/calendar/assets/skins/sam/calendar.css Line: 7 Warning: Expected declaration but found '*'. Skipped to next declaration. Source File: http://yui.yahooapis.com/2.7.0/build/calendar/assets/skins/sam/calendar.css Line: 8 Warning: Expected declaration but found '*'. Skipped to next declaration. Source File: http://yui.yahooapis.com/2.7.0/build/calendar/assets/skins/sam/calendar.css Line: 8 Warning: Unknown property '-moz-opacity'. Declaration dropped. Source File: http://yui.yahooapis.com/2.7.0/build/autocomplete/assets/skins/sam/autocomplete.css Line: 7 Warning: Error in parsing value for 'filter'. Declaration dropped. Source File: http://yui.yahooapis.com/2.7.0/build/autocomplete/assets/skins/sam/autocomplete.css Line: 7 Warning: Error in parsing value for 'filter'. Declaration dropped. Source File: http://yui.yahooapis.com/2.7.0/build/autocomplete/assets/skins/sam/autocomplete.css Line: 7 Warning: Unknown property 'zoom'. Declaration dropped. Source File: http://yui.yahooapis.com/2.7.0/build/autocomplete/assets/skins/sam/autocomplete.css Line: 7 Warning: Unknown property 'zoom'. Declaration dropped. Source File: http://yui.yahooapis.com/2.7.0/build/calendar/assets/skins/sam/calendar-skin.css Line: 249 Warning: Error in parsing value for 'filter'. Declaration dropped. Source File: http://yui.yahooapis.com/2.7.0/build/calendar/assets/skins/sam/calendar-skin.css Line: 262 Warning: Expected declaration but found '*'. Skipped to next declaration. Source File: http://yui.yahooapis.com/2.7.0/build/calendar/assets/skins/sam/calendar-skin.css Line: 345 Warning: Expected declaration but found '*'. Skipped to next declaration. Source File: http://yui.yahooapis.com/2.7.0/build/calendar/assets/skins/sam/calendar-skin.css Line: 347

Then, I get this error:

Error: onloadFuncts[i] is not a function Source File: http://ec2-174-129-53-18.compute-1.amazonaws.com/mediawiki-dev/skins/common/wikibits.js?207 Line: 955

That doesn't look too good, but it's still not directly related to DatePicker.

However, if I subsequently click on the datepicker icon in an attempt to get the datepicker to toggle visible, this error then appears in the Firefox javascript console:

Error: sfiElements[settings] is undefined Source File: http://ec2-174-129-53-18.compute-1.amazonaws.com/index.php/Special:FormEdit/JamFormAdd Line: 97

I've poked around a little bit, but don't see anything obvious yet. Any thoughts?

Thanks!

ahooton


 * Yeah, replying to my own post. I don't have the answer yet, but more info: Something about the order of the scripts on the page and the way things are loaded is preventing the firing of "setup_input_ ".  I inserted a js alert in there and it's not getting displayed, which is obviously why the error about sfiElements[settings] not being defined is getting thrown (which I have figured out also subsequently causes the toggle function not to work).


 * However, "datePickerSetLocale" is being fired. There's something different about where these are on the page, or something, that is causing the OnLoad event to fire one of them but not the other.


 * ahooton


 * OK, I got this figured out. The event handlers were not being defined and added to the callback hook until very late, in-line with generation of the html that actually rendered the on-screen input elements.  In many situations this will cause them to not be fired by the onLoad handler (even though they are supposed to be, this is a very common browser problem across many browsers).


 * The solution is to use $wgOut->addScript in a few places instead of generating the javascript and then eventually using $wgOut->addInlineScript. I've made a few modifications to fix this problem and don't see any issues in the testing I've done on several browsers.  There is a sub-page to this talk page with the modified version, hopefully it will get into the SFI mainline at some point: [].


 * Enjoy.


 * ahooton


 * Hello ahooton. Sorry for not replying, notification was somehow turned off. I'll look into your code and consider it for the next version. Thanks for your effort. --F.trott 11:18, 12 April 2010 (UTC)
 * Same problem, not using Header Tabs, using MW 1.17a, SMW 1.5.2.a-1, SF 1.9.1, SFInput 0.2, Firefox 3.6.6 and IE 6. Datepicker not toggling.  Firefox error console gives "Error: E.Dom.batch is not a function" refering to "{BaseURL}/build/yahoo-dom-event/yahoo-dom-event.js, Line: 8" where I've snipped out the real url.  ahooton's fix did not work for me.  Any suggestions? Hoogs 06:43, 8 July 2010 (UTC)
 * Mmm ok so the page with the faulty datepicker included a few yahoo map input fields that I was testing. These functioned ok but I could not get them to change their default "centre" from 0 0 or default zoom from maximum.  But when these fields were turned into ordinary string input fields, the datepickers started working Hoogs 13:45, 8 July 2010 (UTC)

Feature Request
Is there a possibility to add a modal dialog for adding items to a category. Just like the regular 'uploadable' input field in forms. See http://hackerspaces.org/wiki/Talk:WikiSpaces#Property:Location --Clausekwis 22:08, 12 March 2010 (UTC)


 * Let me see, if I got it right: The input would consist of a listbox containing the existing values (e.g. known locations) and a button to add a value (e.g. a new location) if not present in the list. Pressing this button would open a modal dialog with a second semantic form where you could add information about that data item (e.g. Address, City, Country). Saving that second form would then create an article for the data item, close the modal dialog and copy the name of the created article into the input field. Thoughts:
 * For that to work the second form would have to support the one-step process.
 * Do we have a recursion issue here?
 * I never liked the upload dialogs behaviour of allowing uploading of a document and then not using it.
 * --F.trott 14:34, 7 September 2010 (UTC)

SFI 0.3.1
Hi, for some reason this version does not pick up internationalisations, e. g. after installation the description message stays empty. Additionally it shows version 0.3(.0). Probably not big deal, still I would like you to know. Cheers --kgh 13:41, 31 August 2010 (UTC) Edit: There is a quick fix until this is corrected: Replace “descriptionmsg” with “description” in SemanticFormsInputs.php Cheers --kgh 15:00, 31 August 2010 (UTC) Edit: I filed bug 25017 as requested. Cheers --kgh 20:12, 1 September 2010 (UTC)

May
There's a bug with the month of May showing up as  .

When  , the bug is seen on the calender itself. When using   the bug is seen in the text that gets pasted into the input field.--Hermhut 15:19, 23 September 2010 (UTC)


 * Hi Hermhut, yes, it's a known problem. It will be fixed in the next version. --F.trott 16:17, 23 September 2010 (UTC)