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)

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)