Extension talk:Page Forms

fails in IE
The default text area for free text imput fails in Internet Explorer. When I'm going to create a page with the form, the text box doesn't display and IE shows a JavaScript error. In Firefox works fine. I have also installed FCKEditor.

Using query results as links
I'm using an inline query ({{#ask:) with a custom template to display results on a page, however when I include the page title in the template to create an automatic link to that page, it looks really messy as the page names are all of the form "event_ ".

Is there any way to rewrite the link name, as using the syntax More info here fails.

Ideally I'd use the html More info here, however this also fails due to the {{{page_title}}} element.

Any ideas - everything I've tried so far has failed?


 * Hi, I believe this is a Semantic MediaWiki, as opposed to Semantic Forms, question. However, I think I know what's causing the problem - try using "More info here" again, but add "|link=none" to the #ask query. Yaron Koren 16:32, 15 October 2008 (UTC)
 * Thanks Yaron, your suggestion made it work perfectly!

Problem when editing a field that contains a template with parameters
Hello ! My situation is that I defined a form to edit some simple sheets that have a name, date and description fields, the latter being a textarea in the form. In the description field I have a template applied to format some words. Typically the desc field will get that kind of value:

blahblahblah  blabhlahblah   blabhlahblah

The Format temaplate will just change the size of these word and put them in bold+italic That kind of value is accepted without any problems by the form, but when I try to make an edit using the form, the description field gets truncated at the first semi colon character from a template that way (not truncated for the image)

blahblahblah {{Format

Any idea for a workaround about that ?


 * Hi, this should have been fixed a few weeks ago. Are you using the latest version of Semantic Forms? Yaron Koren 15:11, 19 October 2008 (UTC)


 * Hi, I used the version from semantic_forms_1.3.4.zip, is there a more recent one ?


 * Ah, it looks like you've found a bug in parsing, then. You could always move that description stuff into the free text, which would solve that problem. Yaron Koren 13:20, 20 October 2008 (UTC)


 * Well that's not the ideal solution because I have different fields that fill different part of a template, so I think I'll create pages with the form and make subsequent edits with the normal edit tab so that everything is clean when a new version of SemanticForms comes out :)

"has alternate form" redlinks when using log format URL's (index.php?title=)
I'm using the "has default form" and "has alternate form" functionality on property pages so that users are presented with a choice when they click a redlink that is the object of particular properties. When I'm using multiple values, it produces redlinks that point here:


 * /index.php?title=Special:AddData/Person/John_Citizen?alt_form[0]=Role&alt_form[1]=Committee

... which causes an error because I'm not using short url's, and so there are two question marks. Anyone know a way around this? It's not an option for me to use the shortned URL format. - Borofkin 05:59, 20 October 2008 (UTC)


 * You've found a bug in SF; this will be fixed in the next version. For now, you can fix it yourself by changing, in the file /includes/SF_GlobalFunctions.php, the line

$add_data_url .= ($i == 0) ? "?" : "&";

to

$add_data_url .= (strpos($add_data_url, "?")) ? "&" : "?";

Yaron Koren 23:48, 20 October 2008 (UTC)
 * Thanks very much Yaron -- this has solved my problem. - Borofkin 00:01, 23 October 2008 (UTC)

Turning on 'nowiki' for form input
When setting up a wiki, where the standard user input is via a form, I can get some unfortunate results when a user enters text in a box that is then interpreted as wiki-text which the user didn't want. I wonder can we turn on 'nowiki' for the text taken from text-boxes in forms? For example, if we have have parameter x and the user enters '|x=' in a text box, then x will accidentally be set. Pnelnik 10:47, 20 October 2008 (UTC)


 * Unfortunately, I think that would cause more problems than it would fix. I guess tell your users to not enter pipe characters ('|') haphazardly into form fields. Yaron Koren 13:22, 20 October 2008 (UTC)

Having a Cancel button, rather than a link (making forms look neater)
I see that we have a link cancel at the bottom of the form. It sits beside three buttons Save Page, Show Preview andShow Changes. I wonder would it be tidier to have a Cancel button, just like it's neighbours, rather than just a link? See for example see the Joe the plumber form Pnelnik 20:04, 20 October 2008 (UTC) Though looking at this issue some more, it seems that the buttons and the cancel link are not specific to sematic forms, but rather are inherited from the standard mediawiki edit pages. Pnelnik 20:34, 20 October 2008 (UTC)

Any way to style mandatory fields ?
I don't know if it is something that was overlooked so far, but since there is a 'flag' to force mandatory fields on forms, I would expect to see them identified as such.

Did I miss this feature ?

Would it be possible to give these fields a special CSS class or ID so we could style them differently ? or maybe would you consider adding a mark or an icon next to fields that are mandatory ?

- Laurent Alquier


 * Hi, this already is done, though it's not well-documented: every mandatory field belongs to the "mandatoryField" CSS class. Yaron Koren 21:15, 21 October 2008 (UTC)


 * Thanks. I was able to change the style of mandatory fields. - Laurent

Dropdown doesn't autopopulate when editing a page
Question. Great extension by the way, but I'm having issues with the drop down box. Basically, all inputs on a form auto populate based on what is already on the page. For some reason, dropdown doesn't do this.

For example, if I have a template with parameters A, B and C. If A and B are text boxes, and C is a dropdown. On the form, I put in values for A, B and C. If I then Edit using form, based on what I just made, it seems to erase entered C and makes it blank again, but A and B retain their values.


 * Hm. It shouldn't be doing that, although sometimes browsers cache the value of dropdowns. If you hit shift-reload on the form page, is the problem still there? Yaron Koren 05:24, 26 October 2008 (UTC)


 * Yes it is. It looks like the only forms affected by the glitch are ones which are used in expressions. For example, in textbox "D" lets say, the user can use a template which will do math for him . This is one of the two forms which are not auto populating. The other is a dropdown box which is used in a switch expression (Textbox c is feat1. feat1 becomes when used in the template, followed by a series of expressions.


 * Does the value in the template definitely match, character for character, the value in the dropdown? Yaron Koren 17:57, 26 October 2008 (UTC)


 * Character for Character, its an exact match, even the spacing and capitalization. I even tried removing the expression and seeing if it would even keep the value just passed normally to the template. No go


 * I don't quite understand - in that last test you tried, what was the difference between values "C" and "D"? Yaron Koren 02:03, 27 October 2008 (UTC)

Extending forms to be used with queries
It seems that the forms can very nearly be used as query forms. For example see query forms example. But they still need a little work, see discussion details Pnelnik 13:29, 29 October 2008 (UTC)


 * This is a nice idea, though it's currently impossible, because the preview page is out of the control of SF. It's planned to make preview part of SF (see here), and if/when that's done this could be an interesting feature to look into. Yaron Koren 16:35, 29 October 2008 (UTC)


 * An alternative would be to have a button that does almost exactly the same as the 'Save Page' button, but instead it saves to say a page QueryResult:, where the query_id is uniquely generated for each query. Then the query result pages would then need to be frequently purged. We would also need the permissions set so that everyone would be able to run a query without having to log-in or do a CAPTCHA. Pnelnik 17:53, 29 October 2008 (UTC)

red links
I followed the instructions on the example page and every time I create a book, the author's red link points to a usual edit page instead of to Special:AddData. After editing the book's page with no changes and save it, it works properly. Is there a practical solution to this on MW 1.13? Thanks, Alain.


 * Hi, what versions of SF and SMW are you using? Yaron Koren 13:31, 6 November 2008 (UTC)


 * Hi, I'm using SF version 1.3.5 with SMW 1.3. Thanks, Alain


 * Oh, okay - I didn't really read your question before. This problem is mentioned at the end of the 'red links' section of the documentation; currently the only solution is to disable caching on the wiki. Yaron Koren 14:57, 6 November 2008 (UTC)


 * Hi, I completely missed that section for some odd reason. Works now, thanks. Alain

Current URL
How to get the 'Current URL' of the page, just like 'current user' in the semantic forms?


 * What would you need that for? Yaron Koren 13:29, 26 November 2008 (UTC)
 * I am creating a semantic form for bookmarks, so I want to get the page URL automatically


 * So I assume you're planning to have the name of each page be the URL itself? That could be awkward... but in any case, even if you do that, the user shouldn't need to enter it twice - you could have the URL retrieved by the template itself, using the call. Yaron Koren 17:20, 26 November 2008 (UTC)
 * Thank you, Yaron

Is it possible to have a multivalue field that has carriage returns?
I can't seem to get this to work with the forms but I have built templates that use this format. Any help would be great.
 * Ex:
 * Template


 * Example Page


 * Someone else asked about this recently - I don't think it's possible now, but maybe it should be, using "\n". I'll look into this. By the way, it's spelled "children". Yaron Koren 16:41, 12 December 2008 (UTC)
 * arraymap contains as last param a NEW delimiter, so you can input with "," and displayed with linebreak