Extension talk:Page Forms

Cargo and Values from Category
Using remote autocompletion and having the cargo table and field defined, nothing autocompletes from the category. This is a new form/table I am setting up so not sure if it would autocomplete from field values. I have another field that autocompletes from a category but its got less than 20 pages and doesn't need the remote autocomplete. Its the author and character fields in multiple instance templates http://absitomen.com/lexicon/Form:Plot --Cody3647 (talk) 05:40, 1 January 2016 (UTC)


 * I can't see the error because I need to be logged in, and registration is disabled. Could you create an account for me? Yaron Koren (talk) 16:07, 3 January 2016 (UTC)


 * Account created and random password sent to the email on your user page. --Cody3647 (talk) 02:31, 8 January 2016 (UTC)


 * Okay, thanks. What is an example of a value that doesn't show up during the autocompletion? Yaron Koren (talk) 18:55, 8 January 2016 (UTC)


 * The characters field in the character group multiple instance template section. It only brings up names that are already in the cargo table/field instead of getting values from the category.  (I had removed the cargo table/field parameters to get it to work but added them back to that section so you can see it not auto complete based on category values.) --Cody3647 (talk) 01:33, 9 January 2016 (UTC)


 * I think you misunderstood my question - I want an example of a value (i.e., character name) that should show up in autocompletion but doesn't. Yaron Koren (talk) 05:12, 9 January 2016 (UTC)


 * "Kelvin Watkins" Should get pulled but doesn't. --Cody3647 (talk) 06:11, 9 January 2016 (UTC)


 * Ah, yes. I think I just fixed this in the SF code. Yaron Koren (talk) 16:28, 10 January 2016 (UTC)

Getting error popup missing dependencies 3.4.1
I'm getting a missing dependencies error popup when trying to edit with form MediaWiki 1.25.5 Semantic MediaWiki 2.3


 * What's the exact error message? And what version of SF are you using? Yaron Koren (talk) 16:07, 3 January 2016 (UTC)


 * I too get this, a popup saying

ext.semanticforms.main: Error: Module ext.semanticforms.main has failed dependencies


 * I think it happens only with multi instance templates in the form, but I'm not entirely sure. I'm on `3.4.1`. 182.161.2.94 10:06, 24 January 2016 (UTC)


 * Is this on a public wiki? If not, could you pastebin the form definition? Yaron Koren (talk) 23:58, 24 January 2016 (UTC)


 * Hello Yaron. I had the same message some time ago and found out that this was caused by a syntax fault in combination with a datepicker field. See here for an example. When you edit the page with the form the fault appears and the datepicker won't load. In the form I used  but it should be  . It does not happen when there is no datepicker field. I did not investigate any further but maybe this sheds some light on the issue. --Felipe (talk) 13:29, 25 January 2016 (UTC)

Unselected default value keeps returning
Example,

|

I un-check LED, and don't check any other values for that field. I save, everything saves correctly, but when I edit the form, "LED" is there again. I have to uncheck "LED" every edit. Is there any way for SF to remember that this is unselected? And if not, can anyone think of another way to do this? --Frybread (talk) 07:16, 6 January 2016 (UTC)


 * That's strange. What version of SF are you using, and what's the input type? (I'm assuming "checkboxes".) Yaron Koren (talk) 07:20, 6 January 2016 (UTC)


 * Hey Yaron! Thanks for taking time to answer.  If you're interested, I re-created the issue on the SMW sandbox. http://sandbox.semantic-mediawiki.org/wiki/SMWrules  (click edit, unselect LED, and save - then try editing again. LED will appear as checked.)   Here are links to the form and template and property.--Frybread (talk) 03:01, 8 January 2016 (UTC)


 * Yes indeed, you found a bug. Sorry about that. I think I just fixed it in the SF code. Yaron Koren (talk) 05:14, 9 January 2016 (UTC)

Using a form to edit a specific template
Is it possible to use separate forms to edit the various templates in an article? When I tried doing that, it rearranged the article which is the opposite of what I intended on doing. -- Cy be r XR ef ☎ 17:11, 7 January 2016 (UTC)


 * Are you using "partial forms"? If not, each form needs to include each of the page's templates - unhandled templates should just look like " ". Yaron Koren (talk) 17:58, 7 January 2016 (UTC)

Form Errors
After pulling the latest version from git, getting the following error on a form with restricted fields. Fatal error: Call to a member function getEffectiveGroups on null in /home/absitome/public_html/wiki/extensions/SemanticForms/includes/SF_FormField.php on line 317.

Also dropdown fields are not getting values from the allowed values defined by the cargo table declaration. And under the add button for multiple instance templates getting "@insertHTML_Character infobox___wands@"--Cody3647 (talk) 05:17, 9 January 2016 (UTC)
 * The @insertHTML_Form_Name@ is also getting placed into the wikitext --Cody3647 (talk) 06:30, 9 January 2016 (UTC)


 * The first issue was due to some recent refactoring I've been doing - sorry about that. I think I just fixed it in the SF code. I wasn't able to replicate the other three issues, though - where are you seeing those? Yaron Koren (talk) 05:45, 10 January 2016 (UTC)


 * Im using an older version I grabbed from before the refactoring, so its not showing now. But it was showing under the 'Add...' button for every multiple instance template. Random fields (both dropdowns and textfields) were losing the values that they had before clicking show changes and the multiple instance templates that should have been going into a field were going after the main template. --Cody3647 (talk) 23:49, 10 January 2016 (UTC)


 * Alright - hopefully it won't happen again. Please put in a link to the form if it does. Yaron Koren (talk) 02:30, 11 January 2016 (UTC)

Uploading directly from a URL
I noticed that Semantic Forms doesn't allow uploading directly from a URL (sideloading). Is this something on my end, or a bug?

Using Special:Upload: http://i.imgur.com/NmPrdsd.jpg

Using Semantic Forms: http://i.imgur.com/YWUBaMZ.jpg


 * This was a bug - I don't know how long it's been around, but I think it's fixed now. Yaron Koren (talk) 04:04, 13 January 2016 (UTC)
 * Thank you! I'll make sure to update before posting again.--Frybread (talk) 08:56, 13 January 2016 (UTC)


 * This has been around for more than a year. I never got around reporting it. However it is still an issue with SF 3.4.1 on WikiApiary where you cannot add an URL to the Source URL field. The fix must currently still be in master. --&#91;&#91;kgh&#93;&#93; (talk) 12:51, 17 January 2016 (UTC)

Best practice for adding section headers in page created by multi-instance template form?
An example is a Recipe Form containing two Multi Instance templates. Ingredient and Step. I'm trying to place section headers between the Ingredient and Cooking steps. A generated page might look like this:

I've considered surpressing output in the Ingredient and Step templates and adding all the semantic queries to the Recipe template. This seems like a redundant query however.


 * Doing embedded templates might be the easiest approach - look for "embed in field" and "holds template" here. Yaron Koren (talk) 20:37, 13 January 2016 (UTC)

Naming of field IDs
Any chance it might be possible to somehow name the css id's of the semantic forms fields? I see that you can do this for the class, but the ID would be helpful for javascript and other tedious css tweaks. --Joshkking (talk) 01:37, 14 January 2016 (UTC)


 * Can't you just use the class, by calling getElementsByClassName or something? Yaron Koren (talk) 14:35, 14 January 2016 (UTC)


 * It's certainly doable, though it feels wasteful and against dogma to keep making classes for single elements. I suppose I cant justify myself much more than that though.--Joshkking (talk) 22:25, 14 January 2016 (UTC)


 * Actually I do recall another instance where I was wishing we could define our ID in semantic forms-- that of ID's having a higher priority level. I found a workaround for myself on that issue by marking something as important!, but obviously that's not preferred. Anyways, I don't think it's a necessary thing, but I do think it would be a noteworthy feature. Moreover, selecting by ClassName doesn't seem as well supported by all browsers. --Joshkking (talk) 23:27, 14 January 2016 (UTC)

System message duplicated on action "formedit"
Heiya, in case a wiki requires a user to be logged in for editing the system message "permissionserrorstext-withaction" is shown twice on action "formedit" while only once for action "edit" which is the expected behaviour. See the difference on sandbox.smw.o where I recreated the problem. Help on this and/or a fix is greatly appreciated. Cheers --&#91;&#91;kgh&#93;&#93; (talk) 13:06, 17 January 2016 (UTC)


 * Seems to be a bigger issue. I filed this as . Cheers --&#91;&#91;kgh&#93;&#93; (talk) 13:01, 25 January 2016 (UTC)

Can I used SForms to Append a new subobject to page name
I'm trying to log eggs produced by my chickens and display with a timeseries plot. On the first attempt I created an egg harvest per page using making a pagename eggs/. After some debugging, i've determined the data needs to be subobjects for timeseries result-format to work. Ideally i'd like the form to seem like the "Add Topic" button on this talk page, where data entry for 1 harvest is entered and appended to a pagename=egg/ / page. I'm having some difficulty formatting the date-component into and for pagename. Can the "Add Topic" user interaction be achieved with SMF and the "section" option? Thanks again!


 * Do you know about multiple-instance templates? (It's just "SF", by the way.) Yaron Koren (talk) 17:24, 21 January 2016 (UTC)

Change page name within form?
Hi Yaron, I create page names with help of #formlink, which works fine. Now users should also be able to rename the page name. Is that possible within the form? If I read this I'm afraid not and I will have to use something like this and tell people they have to move the page... --Stefahn (talk) 16:42, 28 January 2016 (UTC)


 * No, you can't rename/move a page from a form, unfortunately. Yaron Koren (talk) 18:11, 28 January 2016 (UTC)


 * Thanks for the confirmation. Stefahn (talk) 21:37, 28 January 2016 (UTC)

The specified target page "title" is invalid.
So I have a form that creates pages based on two fields. It was working, but one of the members just told me that it is not working. Its giving a target page is invalid whenever it tried to preview or save. Also some of my links to the form pass on a parameter and it is no longer getting passed either. This is happening in both the latest version from git and from 3.4.2 from git. Ive currently gone back to another version that does work, though the version listed under version is not correct. I believe its commit f649edc but with a couple of fixes back ported. --Cody3647 (talk) 06:05, 2 February 2016 (UTC)


 * I can't replicate this problem. Have you observed it directly? And what is the page name formula you're using? Yaron Koren (talk) 14:43, 4 February 2016 (UTC)


 * Yes, I tested it and got the same result. The page name formular is page name= --Cody3647 (talk) 16:42, 4 February 2016 (UTC)


 * Okay, I see the issue - it's indirectly due to that #time call. Commenting out this line will fix the problem - I worry, though, that removing it will cause other problems. Out of curiosity: are you sure that this works with that version from a month or two ago? That line was added in 2012. Yaron Koren (talk) 18:05, 4 February 2016 (UTC)


 * Its working. I just created a bunch of pages with the form the same day after going back to that version and it creates the correct title.  The only errors showing up in the error log are "PHP Parse error:  syntax error, unexpected '<<' (T_SL) in /extensions/SemanticForms/SemanticForms.php on line 68" and those Im pretty sure are from before I rolled back to the previous version.  But even if they arent, there are only 3 of them and I created a couple dozen pages.

Mandatory Sub-Checkbox
Hi Yaron. I created a form with a few checkboxes. They are not mandatory. If one checkbox is checked, a new list of checkboxes appears. Now I want to force the user to check at least one of those new checkboxes. Is there any common way? Thank you. --DirkCogno (talk) 07:12, 4 February 2016 (UTC)


 * What about making those other checkboxes mandatory? Yaron Koren (talk) 14:34, 4 February 2016 (UTC)

SF 3.4.2 Problem with parameter transfer
Hi Yaron. Since upgrading to SF 3.4.2 my forms do not work any more. They refuse to transfer given parameters with query strings. I did not have this problem with SF 3.2. Can you give me any hints? Thank you. --DirkCogno (talk) 11:00, 4 February 2016 (UTC)


 * Hi - "do not work any more" sounds a bit extreme... the only thing that doesn't work is the query strings? If so, that was a bug that was fixed a few days ago - if you get the very latest code, either by download or via Git, the problem should go away. Yaron Koren (talk) 14:34, 4 February 2016 (UTC)


 * Thank you for answering so quickly and sorry for my extreme expression. Your are right ... only the query strings do not work correct. I followed your link to the SF 3.4.3 alpha. Everything is fine now with the query strings. Thank you. But now another problem occurs: Pipes in free text input are not allowed. Very similar to this topic from november last year. --DirkCogno (talk) 15:06, 4 February 2016 (UTC)


 * I think he means this topic Pipes in free text input not allowed? --User:SnowlDD


 * Yes, probably. I can't reproduce this problem, though. Is it definitely a free text field, and not a template field? Is it "standard input|free text" or "field|free text"? Yaron Koren (talk) 18:15, 4 February 2016 (UTC)


 * You are right, Yaron. The field definition is This error occured with SF 3.2 with this field type, too. --SnowlDD  (talk)


 * What's the error? Pipes are not allowed in template fields on purpose. Yaron Koren (talk) 20:51, 4 February 2016 (UTC)


 * The content of the field is i.e.

{{#ask: Typ::Maßnahme Maßnahme::M 3.1 Geregelte Einarbeitung/Einweisung neuer Mitarbeiter |mainlabel=Code |?Phase |?Maßnahme |?Anforderungen |?Bemerkungen |?Umsetzungsstatus |?Verantwortlichkeit |?Terminierung |link=none ... &#125;&#125;

This works until version 3.2 and it works with 3.4.2 (where we have the error described above). In 3.4.3 alpha we get the message "|" is not allowed, except within {{...}} or ..., although the pipes are in &#123;&#123;..&#125;&#125;, again.

Will it help if we give you access to this wiki?--SnowlDD (talk) 06:46, 5 February 2016 (UTC)


 * I can't reproduce that problem. Sure, I suppose access might help. Yaron Koren (talk) 14:23, 5 February 2016 (UTC)

Problem with formlink
Hello,

please, could explain why the edit link are not well generated when I use the following code ?
 * Bad edit link HTML code generated
 * Expected edit link HTML code
 * ASK request
 * template ArchiList

Is there a problem with the template and/or the ask request ?

Regards


 * No idea. It would be a hack, but maybe you could generate the needed HTML with the Widgets extension instead? Yaron Koren (talk) 18:04, 5 February 2016 (UTC)


 * Ok, thx for your help
 * it seems that I can solve the problem by adding  with the   parameter like e.g.   with the " #formlink " parser function (one step process)? Cheers  --&#91;&#91;kgh&#93;&#93; (talk) 17:14, 12 February 2016 (UTC) Edit PS: the form and the template with this button.
 * I have a form running with . One-step process with #formlink  works like a charm (on MW 1.23.13, SF 3.4).
 * Tobias (talk) 17:45, 12 February 2016 (UTC)
 * Either it is a bug or I have senior moments right now. Currently I do not even get  to work. I am on SF master and MW 1.25.5 I am pretty confused. Tried to juxtapose "info" and "for template", etc. however ... nothing. Hmm ... --&#91;&#91;kgh&#93;&#93; (talk) 18:05, 12 February 2016 (UTC)
 * Give it a try with SF3.4. My 1.25.5 installation has multiple issues with SF master at the moment. Tobias (talk) 18:11, 12 February 2016 (UTC)
 * I am completely lost right now. Reverting back to 3.4.0 does not help either. I just get "the provided page name 20160212_<20160212[Month]> is invalid." Probably the "20160212" template is messed. I just added, perhaps this is the issue, though I have a working template like this on a MW 1.23.13. Dunno ... --&#91;&#91;kgh&#93;&#93; (talk) 18:26, 12 February 2016 (UTC) Edit: PS. I am back on SF master since this is the version that should work at some point.
 * Could you pastebin (or link to) the full form definition? Yaron Koren (talk) 01:50, 13 February 2016 (UTC)
 * Probably a senior moment: the form and the template with this button. I guess the solution will be trivial. --&#91;&#91;kgh&#93;&#93; (talk) 13:38, 13 February 2016 (UTC)
 * This was a strange one! The issue seems to be that you have an invisible character right before the final "}}}" in the form's "for template" tag, that is messing up the parsing. If you delete that line and re-type it, the problem should hopefully go away. Yaron Koren (talk) 01:43, 16 February 2016 (UTC)
 * Wow, this was indeed a riddle. Did this change and the issue went away. Still do not know how this go there but it is good to know. Thanks a ton! Cheers --&#91;&#91;kgh&#93;&#93; (talk) 08:48, 16 February 2016 (UTC)

Semantic Specialpages missing with MW 1.26.2 and SMW 2.3.1
After a fresh install of MW 1.26.2 and installing SMW 2.3.1 through composer, I see that special pages of SMW are missing from Special:SpecialPages. Also in all property declarations, builtin properties like "Has type" is linked as new (red).

The same install of SMW (2.3.1) works with MW 1.25.5 flawlessly.

Is there a step missing in install documentation?


 * You are talking about the special pages provided by Semantic Forms or Semantic MediaWiki? Using this talk page suggests the first, I am not sure though. Cheers --&#91;&#91;kgh&#93;&#93; (talk) 13:40, 13 February 2016 (UTC)

Properties aren't saved/populated
Hi i'm using MW 1.26.2 and Semantic Forms 3.4.3. I've created properties, a template and a form. Everything is working, but the properties aren't saved. My definition in the form:

The property is called "Software Name". With $smwgShowFactbox = SMW_FACTBOX_SHOWN; in LocalSettings.php I can see, that the saved form-page has no saved properties. Can anybody help me? What can be the problem? Regards, Stefan


 * If you just do an "edit" (not "edit with form") on the page created by the form, do you see the right value there? If not, it's a Semantic Forms issue - if it's there, it's a Semantic MediaWiki issue. (By the way, you probably don't need that "values from property=" parameter, but that's a minor point.) Yaron Koren (talk) 16:15, 16 February 2016 (UTC)


 * Thank you, I've checked that width "edit with form", after saving. The result is this:

Sorry, but i didn't understand: is it now a Semantic Forms issue or a Semantic MediaWiki issue?


 * In the form, it's "Software Name", and in the page it's "Software name" - two different capitalizations. Could that be the problem? I don't see how that page could have been created with that form... Yaron Koren (talk) 18:47, 16 February 2016 (UTC)


 * No, sorry. the field called firstly "Software Name", but I've deleted that, and created after that a new property "Software name" (see above the corrected code). I've tried with "Vendor software", too, but the property is empty! Any suggestions?


 * Hi Stefan, you've given no information about how you've set up your template to use that property. Is something wrong there? Cavila 11:58, 17 February 2016 (UTC)


 * Hi Cavila. it's very strange. I made a lot of tries last day. If I create a new category, 3 new properties, a template, a new form and a new article with the form, is everything OK. It's working. But if I create more and more properties, adding this to the existing template and form, than the properties aren't saved anymore. Every property is empty. After that, if I deleting the newly added properties from the template and from the form (=it means, I'm going back to the first state of the form and template), the semantic data is empty. That means, that maybee the data of the form or template is corrupted in the database! I can't adding new article, too. If I create everything (category, properties, template and form) new with new names and the "same" things, than it's working! It's really crazy. Something has to go wrong by saving, I think. Here is my needed form and template:
 * The form:

Dies ist das Formular „Softwareformular“. Um eine Seite mit diesem Formular zu erstellen, gib den Softwarenamen in das Eingabefeld unten ein. Sofern bereits eine Software dieses Namens vorhanden ist, wirst du automatisch zum Bearbeitungsformular der Seite weitergeleitet.



Roles
'' * Ein Sicherheits- und/oder Betriebskonzept ist zu erstellen, welches die Anforderungen sicherstellt; ggf. auch Datensicherung.''

General informations

 * And my template:

Beschreibung
Standardvorlage für Software und Systeme (ITQM).

Verwendung
Bitte den folgenden Zeilen in den Artikel einfügen und hinter dem "="-Zeichen die Werte setzen:

Roles
* Ein Sicherheits- und/oder Betriebskonzept ist zu erstellen, welches die Anforderungen sicherstellt; ggf. auch Datensicherung.

Regulatory
WENN REGULATORISCH RELEVANT:

General informations
Hi Stefan, there's nothing in your template to suggest that you're using properties! Please see https://www.semantic-mediawiki.org for information on how to use SMW. Concerning the use of templates in particular, you could have a look at this page. Cavila 11:29, 19 February 2016 (UTC)

delete instance of multi instance template
I updated last weekend to get the datepicker fix. One of my users noticed something weird going on with the multi instance template. I had a datepicker that was supposed to prepopulate the date and it wasn't getting added. I'm not entirely sure what was going on, but I saw there were some more recent updates, so I pulled that and that issue is gone. However, now I can't seem to delete an instance in the multi instance template. Is there still some work being done here? Thanks. --Kc5vcx (talk) 22:51, 18 February 2016 (UTC)

Update: It just won't seem to let me delete the last/only instance of a multi instance template. I mean I can click the gui X and it goes away, but when I save the form page it doesn't actually change anything, even version history doesn't register a diff. I have min instances set to 0 in the form. I have to go to edit source to get rid of it, but then and I don't think I noticed this before, when I don't have any instances I see on the page like as a place holder. --Kc5vcx (talk) 23:03, 18 February 2016 (UTC)


 * Are you using the very latest version of the SF code? I just made some fixes for multiple-instance template handling earlier today. Yaron Koren (talk) 01:48, 19 February 2016 (UTC)


 * I think/thought so. I did git pull on the master branch and I see the updates in the log, but Special:Version still says Semantic Forms 3.4.3-alpha (72c7267) --Kc5vcx (talk) 03:07, 19 February 2016 (UTC)