Extension talk:Page Forms

Upload file Window doesn't popup
When i click on "Upload File" nothing happens - i have the extention fancybox installed and set $wgBreakFrames= false; When i change this variable to true and then back to false - The upload Window popsup, but only for the next form you are filling out. And then for the second form you want to fill out -> nothing happens, when you click on upload File. This is a cut of my formcode: Beitragstitel: fckLR 

This is a cut of my templatecode:

I would be really greatfull, if you could help me!


 * See the 5th item here. Yaron Koren (talk) 14:49, 2 July 2014 (UTC)

This is very funny - with &debug=true the upload File window pops up :P And i tested now too with IE and there it works.. I guess there is no possibility to allways set &debug=true at the end of the URL?


 * Oh, that's too bad - it makes the JS problem (whatever it is) hard to isolate. There's no simple way to do that, but I believe you can accomplish the same thing by adding the following to LocalSettings.php:

$wgResourceLoaderDebug = true;
 * It's not recommended as a long-term solution, though. Yaron Koren (talk) 15:23, 3 July 2014 (UTC)

Issue with sfautocomplete (values from url)
Hello Yaron, I'm having a problem with autocomplete (values from url). When I use values from property or category and start to type in a value on the form, all the values that can be excluded fall off the selection list. However, when I use values from url it only highlights the applicable values instead of eliminating the others. So I am left with a long list of possible values with some highlighted. Is this the way in which the values from url functionality was programmed? Thanks.

Info: 

LocalSettings.php = $sfgAutocompletionURLs['Name'] = ' .php?search= ';

Form Field =

This is what the php call shows = {"sfautocomplete":[{"title":"Name 1"},{"title":"Name 2"}]}

Clifford.kasper (talk) 21:23, 2 July 2014 (UTC)


 * That's not good... it sounds like a bug. As it turns out, all of autocompletion, including autocompleting on external values, is getting overhauled as part of this project. If you're willing to wait a month or so, the whole thing will hopefully work a lot better by then. Yaron Koren (talk) 23:31, 2 July 2014 (UTC)


 * Thanks Yaron Koren. We'll wait until this project gets released before we look any further into it.  It looks like a very promising update. Clifford.kasper (talk) 18:12, 11 July 2014 (UTC)

mandatory parameter stopped working for combobox
Hello,

As in subject. It was working until today, today suddenly it stopped working. I haven't changed anything in the wiki at all. When you save the form with empty combobox fields, it does not tell you that the field cannot be empty. Mandatory parameter works with other input types!

Any ideas why this is happening?


 * Have you updated the SF code recently? "combobox" handling changed quite a bit in the last few weeks, in the Git code. Yaron Koren (talk) 18:37, 7 July 2014 (UTC)

Haven't changed anything. It just stopped working. Should I try updating it?


 * You could update... another option is to look in the JavaScript console, if you know how to do that - my guess is that there's a JS error somewhere, that blocks the combobox checking from taking effect. Yaron Koren (talk) 13:29, 8 July 2014 (UTC)

Form with value mapped to TWO properties
What I am trying to do is set the value that the user inputs into the combobox to both the Has Primary Category AND Has Category. Is there a way to do this or am I going to have to find a completely different way to do something like this?

This is what I am trying to use: ! Primary Category: |


 * The form doesn't set the property value; the template does. You would just need to modify the template to set both of those properties to that field/parameter. Yaron Koren (talk) 17:19, 11 July 2014 (UTC)


 * Thanks Yaron, this just made my job 20x easier.

'View with form' -> can I force a page/category always to open with the form?
The 'edit with form' is working very well.

Unfortunately, when the form is saved, the format is not attractive to end-users.

It would be really useful if they could only, or, at least as a default, see the page open in 'Edit with form' - or, even better, an exact alternative 'View with form' that didn't allow changes. The latter would be nice, but isn't crucial.

I see that I can hide the 'edit' tab, but that doesn't really help if it opens in the standard 'read' view, not the form view.

It might work if you could set 'save page' to save the page, but then open it in 'edit with form'.

I"m sure that this can, and is, done, so I know I'm probably missing something obvious!


 * If you're talking about displaying the form instead of the actual page, I don't believe that can be done. Why not just improve the display of the template(s)? Yaron Koren (talk) 12:29, 15 July 2014 (UTC)

Image uploads on mobile?
Has anyone come up with a way to make the image upload work on mobiles? When the pop up launches, it causes a new page on mobile browsers. The new page allows uploading from the mobile browser, but it doesn't insert the image name into the form after the image is uploaded. It just leaves the user at a blank page, causing confusion. I wonder if there's a way to force mobile browsers to allow a pop up?

Notice: Undefined offset: 0
Im recieving the following error whenever I try to create a new form

Notice: Undefined offset: 0 in /erp/webcontent/mediawiki/extensions/SemanticForms/includes/SF_FormField.php on line 234 Notice: Undefined offset: 0 in /erp/webcontent/mediawiki/extensions/SemanticForms/includes/SF_FormField.php on line 234

I have been trying to fins the source of this error to no avail. Does it have something to do with having two Hidden fields on my form?


 * What page are you on when you're creating this form, and does it let you create the form or not? A notice message by itself shouldn't halt the process. Yaron Koren (talk) 19:37, 15 July 2014 (UTC)


 * I am on Special:CreateForm and it does let me create the form. But I dont understand what the problem is. And for my main form to create new articles it will load the form and allow input, but then freezes mid completion for 5-10 seconds. Once it unfreezes, everything is fine and the article is created like it should be. I do not know if this could be caused by the warning, but it does not throw any errors or warnings when I have the debugger on.


 * Alright, that's good to know. The second issue seems unrelated - it sounds like normal Javascript loading time. Yaron Koren (talk) 00:59, 16 July 2014 (UTC)

Updating all Pages which use a form
So this is probably a very unintelligent question but I have looked all over and I cannot seem to find the right answer. I have a form which I am constantly making updates to based upon new needs from my company. Currently there are over 100 pages which use this form. When I add a new tag the only way I know to update each page (template) is to Edit with form and then save the page without making any changes.

For instance, if I added the following to Form:New Task

Then in Template:Task I added: {{#vardefine:time|{{#time:F j, Y|now}}

{{#switch: {{{SubmissionComplete|false= {{#autoedit:form=New Task
 * target={{PAGENAME}}
 * link type=button
 * link text=Submission Complete
 * query string=New Task[NeedDate]={{#var:time}}
 * reload}} | }}

Summary required by: {{#switch: {{{SubmissionComplete
 * true={{#expr: {{#time:U|{{{NeedDate|}}} }} + 432000}} }}
 * false=The submission is not complete.}}

So I have a few things like this on my site. In this the user would click on the button Submission Complete which would set the current date to the Form Field=NeedDate. That field date would feed into the Template, add 5 days and set the due date for the Summary. It is also tied into the Semantic Tasks Extension to send an email update until I can figure out how to work this in with Echo.

The problem is that once I update the Form, it does not populate all the pages which use that form with the new {{{field}}} and there will be multiple errors. If I run SMW_refreshData.php or runJobs.php it will update the Template and property values but it will not add the field to the pages. Is there any script or way to automate this? Thanks!

Clifford.kasper (talk) 15:41, 17 July 2014 (UTC)


 * Have you tried using the Replace Text extension? There might be a fairly straightforward solution there using regular expressions and wildcards. Yaron Koren (talk) 19:31, 17 July 2014 (UTC)


 * Yaron Koren, thanks for the quick reply. I'm not wanting to replace something but to add the form Field to the pages.  If I used the Replace Text and Identified a line on the form, say a Field tag above where I wanted to add the new one and replaced that Field tag with a new string to include the replacement and the addition, I might overwrite some existing data.  Does this make sense?  Thanks. Clifford.kasper (talk) 14:00, 18 July 2014 (UTC)


 * It wouldn't overwrite existing data if you used wildcards. Yaron Koren (talk) 23:20, 18 July 2014 (UTC)

Popup forms
I'm either not understanding this, or it isn't working.

I've got a form that works OK. It also works with a file up-load pop-up screen.

I've tried to get the other form to work as a pop-up, but it just goes to that form's page, then, when you fill it in, doesn't return to the original page.

Does the 'popup' have to be in a particular place, or do you have to have some other extension for it to work?

Fustbariclation (talk) 09:59, 22 July 2014 (UTC)


 * No, and no. Could it be that there's some other Javascript error that's preventing the popup from happening? Yaron Koren (talk) 12:59, 22 July 2014 (UTC)

'add button text=' not working for a file upload
The {{{field}} tag seems to be ignoring the 'add button text=' - this is with 'uploadable' set. It sets the 'default value' on the file upload pop-up, but it's not filling in the default value in the form. What is the obvious thing that I'm missing?

Does the order matter? I thought that part of the point in having named parameters was so that it didn't. .... ...
 * Action tracker file:

In the template I've got:

Action tracker file
Action Tracker File

Fustbariclation (talk) 10:04, 22 July 2014 (UTC)


 * "add button text" is a parameter for the "for template" tag, not the "field" tag. Yaron Koren (talk) 13:07, 22 July 2014 (UTC)

Trouble with using 'Email' for a default value
Most of the default values work perfectly well.

I've been having trouble matching e-mail addresses.

! Logged_Email:

I know that the usernames are all in the same format as the e-mail addresses - deliberately, so I can do this sort of thing. I've tried various alternatives such as: default=mailto:@kchclinics.com default=Mailto:@kchclinics.com It doesn't seem to pick it up though. It says that special properties can be used like other ones, but there's clearly some difference that I'm not understanding.

Fustbariclation (talk) 11:40, 22 July 2014 (UTC)


 * "#username" is not a special property; it's a parser function. And I'm guessing the issue is that the "default=" value isn't parsed, which means that you can't include parser functions there. If that's the case, that can probably be easily changed/fixed in the SF code. Yaron Koren (talk) 13:09, 22 July 2014 (UTC)

How can i use "values dependent on" parameter?
where i can see an example how can i use "values dependent on" parameter?

if not exist an example... my doubt is the next:

i have this:

if i chose USA on the first "field", the second "field" should show values like: NEW YORK, HOUSTON, CHICAGO; LOS ANGELES... my question is: where must be those names of cities?... are properties?, are values of properties?, are pages?, are categories?

i hope can help me... Crystian Marquez


 * Yes, you have it right. Those city names have to appear in pages in the wiki that use the "Restaurant" template, where "Country" is set to "USA". Yaron Koren (talk) 20:06, 24 July 2014 (UTC)

I cannot make it works...

i have this

Template:Resturant

Form:Restaurant

and have three diferent pages: Houston, New York, Chicago... whit this code:

when i want create a new page of an other city for example "Boston" whit the "Restaurant" form, it suppose that the "City" field must show values like Houston, New York, Chicago, at the combobox... but it does not, am i doing something wrong? Crystian Marquez


 * It's strange that you're using the "Restaurant" template to define cities - Houston is not a restaurant. :) Still, that should work - the only thing that you're missing is that the template needs semantic properties for both "City" and "Country". Yaron Koren (talk) 16:49, 28 July 2014 (UTC)

Thanks!!!...i finally got it work, what i needed was the semantic property...

Autoedit and multi-instance templates
Hello! The autoedit function is a real hit with my users. I'm trying to apply it to an embedded multi-instance template that sets some subobjects, but having some trouble. When the button is clicked the page gets modified, but the template values are blank (and it leaves 2 of these blank instances?). The autoedit query string is specifying the name and fields of the embedded template. Should I be specifying something else/more that identifies the template+field set with 'holds template'? Or something else? Using Special:FormEdit/myform works exactly as intended. Thanks! - Lbillett (talk) 14:37, 25 July 2014 (UTC)


 * After some more experimenting the issue might be better described as - autoedit blows up on multiple instance templates. I expected it might respond by creating a new template instance on the target page (if the 'for template' tag was set to multiple). Might there be another way to accomplish the end effect?


 * I'm trying to create a simple way to collect dated acknowledgements from users on a target article. I thought I could accomplish it with an autoedit link that would add their username and date as a subobject to the target. If autoedit+multiple instance templates can't do it, is there another way I maybe haven't thought of? The multiple temps and subobjects would allow a lot of useful queries like 'what articles has user x acknowledged and when?' or 'what users have acknowledged article y'. - Lbillett (talk) 18:52, 25 July 2014 (UTC)


 * Ah. I'm describing a planned feature. Move along, move along. - Lbillett (talk) 00:44, 27 July 2014 (UTC)


 * Right. :) The handling of multiple-instance templates within #autoedit is definitely lacking at the moment. Yaron Koren (talk) 12:53, 28 July 2014 (UTC)

How to add poem tag within semantic forms
I have a semantic form which is working well. However, I have not found a way on how to include the poem extension tags. This means that users have to include the tag into the input box before typing information in. Is there a simple solution for this. Thanks.

Wikimanz (talk)


 * If the tag is supposed to cover the entire field, just add it to the template. Yaron Koren (talk) 16:04, 27 July 2014 (UTC)

Cannot make |show on select work with
Hi, I am trying to make something like this work in SF but cannot make the headertabs work together with |show on select:

Is it supposed to work?

=heading1= text =heading2= text =heading3= text

=heading4= text


 * I would be surprised if that could work... Yaron Koren (talk) 12:52, 28 July 2014 (UTC)


 * Maybe try using the heading1 etc. tags instead of wikitext sections? Sometimes that can make a difference. - Lbillett (talk) 13:09, 28 July 2014 (UTC)
 * Oh, you want the tab to appear? I'm way off, then. - Lbillett (talk) 13:11, 28 July 2014 (UTC)

Special:FormStart and #forminput / page name scheme
This is a follow-up to the corresponding thread in the January to March 2014 archive, discussing options to prevent users from accidentally overiding a semantic form page name scheme. What can be done is adding code to the form itself that checks whether the page name is either "empty" (in that case PAGENAME returns "Semantic Forms permissions test") or corresponds to the defined name scheme (for the latter a regex extension e.g. "regex fun" is needed). If neither is the case, a warning box is displayed suggesting to the user to follow a link generating an empty form with page name scheme. The following code illustrates this, assuming a form "ticket" and a name scheme "Ticket_####". --Hans Oleander (talk) 10:21, 30 July 2014 (UTC)

Can I recover my forms from a sqldump of the mediawiki database
I had to restart all my wiki from an xml dump, that sadly enough did not contain the .css and the forms.

Is there any (even manual) method from which I could extract the text of the forms from the sql dump ?

Eg after I replace some cryptic codes with the accented letters it refered to, I detect in table mw_searchindex, entries such as : (1239, 'auteur', ' ceci est le formulaire u8c2ab auteur u8c2bb. pour créer une page avec ce formulaire entrez le nom de la page ci-dessous ; si une page avec ce nom existe déjà vous serez dirigé vers un formulaire pour lu8e28099éditer. #forminput form auteur for template auteur class formtable prenom field prenom - nom field nom - particule field particule - pseudonyme field pseudonyme - datenaissance field datenaissance - datemort field datemort - role field role - codeauteur field codeauteur - portrait field portrait - legendeportrait field legendeportrait - wikipedia fr field wikipedia fr - wikipedia en field wikipedia en - wikipedia de field wikipedia de - wikipedia es field wikipedia es - nombre de séries field nombre de séries - nombres de tomes field nombres de tomes - nombres de livres field nombres de livres end template texte libre   standard input free text rows 10 standard input summary standard input minor edit standard input watch standard input save standard input preview standard input changes standard input cancel ')

Any idea how I could reverse engineer from these ?


 * That's just the form definition without "{", "}", "|", etc., so yes, you could reconstruct it manually from that - or you could just use Special:CreateForm to create the form from the template, since this looks like a pretty standard form layout. Yaron Koren (talk) 18:01, 5 August 2014 (UTC)

Forms inputs "datepicker"
for "input type=date" works the next:

but, for "input type=datepicker" does not works "default=now"

how can i do that "input type=datepicker" field prints the current date?

Crystian Marquez


 * That sounds like an issue for the Semantic Forms Inputs extension. Yaron Koren (talk) 00:51, 7 August 2014 (UTC)


 * Yes, notice that the only valid value for default is yyyy/mm/dd. Instead of 'now' you can put in . seems to work in my environment. - Lbillett (talk) 15:28, 7 August 2014 (UTC)

perfect! that works, thanks!

Embeded uploadable multiple instance template?
Uploadable multiple instance templates are working nice. Embedding them in a 'parent' template would allow for some nice control of the output. But when I try, the form seems to break (no upload link). I haven't found a working example (yet). Should it be possible under MW 1.21.2/SF 2.5.1? It's for helping my... 'less proficient' users display images on specific articles. My form definition look as:

The 'Related Images' template sets the 'Image' property (of type Page), and 'My Template' simply outputs the contents of the 'Related Images' field/argument (which I hope to be a series of calls to the 'Image' template). Am I missing something important? Thanks! - Lbillett (talk) 16:07, 7 August 2014 (UTC)


 * This might be part of the 9th item listed here. Does the "Upload file" link show up for "existing" instances? Yaron Koren (talk) 20:45, 7 August 2014 (UTC)

values from query
i want values for a combobox that comes from a query, for example something like this:

i tried this but does not work. My question is: can i get values from a query?

Crystian Marquez


 * The best way to do it is to create an SMW "concept" that matches that query, and use "values from concept". Yaron Koren (talk) 01:12, 12 August 2014 (UTC)

Radio buttons without labels?
Is it possible to have radio buttons without labels? Any option to suppress labels in CSS? Tyvm, Psyc0smos (talk) 20:25, 16 August 2014 (UTC)


 * Yes, I would think so - you just need to put the CSS in MediaWiki:Common.css. Are you asking about the specific CSS to use? Yaron Koren (talk) 12:37, 18 August 2014 (UTC)


 * Tyvm, Yaron. My CSS knowledge is quite rudimentary but I found a (probably suboptimal) solution that works for us: font-size:0 and some left & right padding to center the actual button. Display:none doesn't seem to be an option since the label tag also includes the input. Psyc0smos (talk) 13:53, 20 August 2014 (UTC)

Combining properties in a query
Hi all

I'd like to merge properties all into one for a query.

At the moment I have this query set up:

What i'd like to do is combine the different properties so the report has them all in the same column - for example:

Is this possible at all?

Thanks


 * This isn't a Semantic Forms question; but anyway, you would need to create new properties, one for each concatenation, and set them within the template. Yaron Koren (talk) 12:38, 18 August 2014 (UTC)

Conflict with WikiEditor extension
I am using MW 1.22, SF 2.7, and WikiEditor 0.3.1

When the following line is added to LocalSettings:

extra versions of the Edit Summary field as well as the Minor Edit and Watch this page checkboxes appear at the bottom of the page (under everything, including the footer, and running the full width of the page) whenever you create or edit a page using an SF form.

Note: the line in question adds Publish and Cancel buttons in the top-right of the editor.

This only happens on SF driven pages, and only when editing using the form.

Disabling the option or commenting it out solves the problem.

--Ramalj (talk) 21:39, 19 August 2014 (UTC)

Multiple instance templates not working in MW 1.24a and SMW 2.0 ?
Hi, we have trouble with multiple instance templates in a form. When "Edit with Form", there are JS errors (different ones, depending on the version). Clicking on "add another" button does no work (i.e. nothing happens).


 * Live example: http://edutechwiki.unige.ch/t/SF_multi_instance_2
 * MW = 1.24alpha (377a12e)
 * SMW = 2.0

Semantic Forms 3.0-alpha (8ab21f8) 12:42, 18 August 2014

TypeError: $.browser is undefined jquery.fancybox.js:29 TypeError: $content.find(...).makeCollapsible is not a function mediawiki.page.ready.js:23 TypeError: $.client is undefined mediawiki.searchSuggest.js:30

Semantic Forms	2.7 (8ab21f8) 12:42, 18 August 2014, and $wgIncludejQueryMigrate = true:

TypeError: jQuery.widget is not a function SemanticForms.js:19

Semantic Forms	2.7 (8ab21f8) 12:42, 18 August 2014, and $wgIncludejQueryMigrate = false:

TypeError: $.browser is undefined jquery.fancybox.js:29 TypeError: jQuery.widget is not a function SemanticForms.js:19 TypeError: $(...).live is not a function SF_submit.js:185

Is this a real bug ? and is there a workaround, like reverting to some other combination of SMW/SF ?

- thanx and greetings ! Daniel K. Schneider (talk) 14:10, 20 August 2014 (UTC)

PS: File upload also seems to have a problem, but I did not yet look into it in more details.


 * Try SF 3.0-alpha with "$wgIncludejQueryMigrate = true". Yaron Koren (talk) 15:36, 20 August 2014 (UTC)


 * Thanx Yaron, but unfortunately this doesn't work either - Daniel K. Schneider (talk) 15:05, 21 August 2014 (UTC)


 * Full FF trace:


 * Full Chrome trace:


 * That seems impossible... are you sure you have "$wgIncludejQueryMigrate = true" set? Yaron Koren (talk) 15:34, 21 August 2014 (UTC)


 * Found the problem. I had, since I somewhere read that it's good vodoo. Uncommenting the line fixed :) - thanx for your help ! - Daniel K. Schneider (talk) 17:06, 21 August 2014 (UTC)

Form actions URL
We use &usekin=skinname quite often to apply styling and mainly get rid off "noise" like the sidebar where it is not really needed, also for providing pages to embed in other off-wiki websites.

Using RunQuery as a example, on our wiki the form action looks like.

So the question whether it is somehow possible to get url parameters like &usekin=skinname in the form action? Ideally for the standard input buttons and #formlink & co as well.

Psyc0smos (talk) 14:35, 20 August 2014 (UTC)


 * That's interesting - I guess Special:RunQuery should carry over the value of "useskin". I don't think there's any way to get around that from within the form definition - but one option that might work is to have some extra code, in LocalSettings.php, that overrides the value of $wgDefaultSkin if $wgTitle is set to Special:RunQuery, Special:FormEdit, etc. Yaron Koren (talk) 15:39, 20 August 2014 (UTC)

using 'multiple' to insert multiple values
so im trying to insert multiple values of a certain template called people

this works, but when i extract the output data into something like a CSV file i get all these multiple values in one field.

what is the alternative work around for me to separate these values into different fields or rows but using the same properties?

i hope i was clear, thanks

--Noopty (talk) 13:18, 25 August 2014 (UTC)


 * Instead of regular SMW properties in that template, you should be using subbobjects or the Semantic Internal Objects extension. Yaron Koren (talk) 14:00, 25 August 2014 (UTC)


 * Thank you Yaron!, if it is possible can you refer me to some examples or instructions on how to use them with Semantic Forms? --Noopty (talk) 05:02, 26 August 2014 (UTC)


 * I don't know how best to explain it, but if you just add a #subobject call to the "people" template, the whole thing should just work. Yaron Koren (talk) 12:55, 26 August 2014 (UTC)


 * Hi Yaron! so i added #subobject this way


 * but still when i use multiple then extract the results in Special:Ask into a CSV i still get both names in 1 field separated by a comma, is my syntax wrong? --Noopty (talk) 05:37, 27 August 2014 (UTC)


 * Hi again!! i am so sorry i totally forgot how CSV files work and this is why i am getting the comma in my export! i found a work around since we cannot export the data to an excel workbook ( i dont know if there is an extension or we will get this soon) anyhow i find the results as Table save the page in HTML, open it in Excel then copy the table into another sheet and save it as a workbook. Sorry for the inconvenience thank you Yaron :)! --Noopty (talk) 06:20, 27 August 2014 (UTC)

Testing SF 3.0 alpha
Just a note to let you know that two features appear to conflict in the latest code. When a form contains a multiple-instance template as well as a field with 'combobox', the "Add..." button for the multiple-instance template becomes frozen - i.e. clicking it has no effect, at least in MW 1.23. Cavila (MW 1.22, MySQL 5.5.37-0, Php 5.4.4-14 squeeze, SMW 1.9.2, SF 2.7) 11:34, 26 August 2014 (UTC)


 * This problem isn't happening for me, here. Could you add "&debug=true" to the URL, then look in the Javascript console to see if there any JS errors there? Yaron Koren (talk) 13:04, 26 August 2014 (UTC)


 * TypeError: select[0].options is undefined
 * => SemanticForms.js line 24, under "combobox":
 * var curval = select[0].options[0].value;
 * This happens in combination with "values from category". Cavila (MW 1.22, MySQL 5.5.37-0, Php 5.4.4-14 squeeze, SMW 1.9.2, SF 2.7) 13:40, 26 August 2014 (UTC)


 * Ah, okay. That line is no longer in SemanticForms.js - could you try upgrading to the very latest version of the code? Yaron Koren (talk) 19:44, 26 August 2014 (UTC)


 * Haha, thanks. There I was thinking I was using the latest code. Special:Version confirmed that I was using at least a version of SF 3.0 alpha, but I must have misunderstood how Git works. I now clicked on the 'tree' link at the end of the latest change and downloaded this version, which seems to work perfectly fine! Loving the new Select2 features, btw. Cavila (MW 1.22, MySQL 5.5.37-0, Php 5.4.4-14 squeeze, SMW 1.9.2, SF 2.7) 21:12, 26 August 2014 (UTC)

toggle 'advanced options' in multiple-instance templates
Penny for your thoughts? I've been looking at ways in which every multiple-instance template in a form can have additional fields ('advanced options') that are initially hidden from view but can be shown on-the-fly. Of course, there's MW's own implementation of collapsible elements, but as you know, they don't work for newly added templates. Having looked around for a bit, I finally stumbled on two possible solutions, both of which are skin-specific: It would be wonderful if this functionality was available to any SF user. Or do you know of any alternatives / suggestions? Perhaps you have even got plans to address this specific need? Best, Cavila (MW 1.22, MySQL 5.5.37-0, Php 5.4.4-14 squeeze, SMW 1.9.2, SF 2.7) 13:00, 27 August 2014 (UTC)
 * Skin:Foreground: offers navigation tabs that can be embedded inside a 'multiple form';
 * Skin:BootStrapSkin: offers collapsible/expandable jQuery portlets that can be used inside a 'multiple form'. The skin still suffers from a few js-related issues (at least, if you're using SMW), but it seems worthwhile keeping this in mind.


 * I doubt those would work either... the basic problem is that custom JavaScript elements don't work in newly-added templates, and that's because, when HTML is added dynamically to a page, any such JavaScript has to be specifically applied to that new HTML. So, for this to work, whether it was MediaWiki's collapsible elements or anything else, I would think that Semantic Forms would have to set up some sort of JS "registry", where the set of all JS functions that are supposed to be applied to new template instances is stored. I actually looked into this briefly before, but gave up; but my guess is that it's doable. Yaron Koren (talk) 15:28, 27 August 2014 (UTC)


 * Actually, I got both of these working using the respective skins, or at least the jQuery functionality appeared to be in order. What I haven't checked, admittedly, is whether the input data are all properly processed when the page is saved, so that will have to be done first. I just tried to borrow some css and js from the Foreground skin in order to create a 'Gadget', but some javascript elements always send me to an error page saying "Method not implemented". What about jqGrid, which allows you to hide/show columns or to use modals for editing rows? Cavila (MW 1.22, MySQL 5.5.37-0, Php 5.4.4-14 squeeze, SMW 1.9.2, SF 2.7) 20:56, 27 August 2014 (UTC)


 * jqGrid is mentioned in the third item here - is that the kind of thing you're talking about? Yaron Koren (talk) 22:05, 27 August 2014 (UTC)


 * Well, I mentioned jqGrid in part because I knew you have it on your list of stuff to add. It is a great idea in general (!), but I was openly wondering if it could also be used to target this issue; perhaps one way in which it could be done is by having extra columns that appear beyond the normal width of the grid window and so need be reached by using the horizontal scrollbar (functionality that comes with the package, I guess). I'm not yet entirely convinced, but that could ease things in theory. Cavila (MW 1.22, MySQL 5.5.37-0, Php 5.4.4-14 squeeze, SMW 1.9.2, SF 2.7) 13:30, 28 August 2014 (UTC)


 * I don't understand. Yaron Koren (talk) 16:55, 28 August 2014 (UTC)