Extension talk:Page Forms/Archive April to June 2014

Latest comment: 9 years ago by Yaron Koren in topic Query string function

SF without SMW?

This may sound stupid but I don't use any semantic functionality, and all I want is the forms (the fields don't even need to have the semantic properties). Is there a way to use just the forms extension without SMW. If not, is there a way to disable as much as possible semantic functionality (not to drag resources). Thanks so much! -- 16:11, 1 April 2014 (UTC)Reply[reply]

Unfortunately, no - you'll have to install SMW. If you don't use any of the SMW functionality, though, its presence shouldn't have any real impact on performance. Yaron Koren (talk) 00:30, 2 April 2014 (UTC)Reply[reply]

Removing Empty Paramters

I'm in the process of adding semantic forms to the RPG wiki I run. All of the pages I'm currently adding a form for editing them have infobox templates that have all of the parameters listed out on the page, including empty parameters. I like that when using the form to edit, it removes the parameters that don't have any value assigned to them. The only reason I had them all in each page to begin with was because I'm working with mediawiki illiterate members, hence adding forms for them to fill in information. So my question then is, I just managed to get an multiple instance template to work when it embeds in the main template but the form is adding the empty parameters of the embedded template. I would much prefer not to have the empty parameters.--Latinlives (talk) 23:13, 14 April 2014 (UTC)Reply[reply]

I'll have to look into that - it sounds like a bug. Yaron Koren (talk) 14:38, 17 April 2014 (UTC)Reply[reply]

Use Semantic Forms to Move Page

Not sure if this is currently possible, but figured it couldn't hurt to check if I was missing something. I want to be able to let users move a page like "Texas\San Antonio\Restaurant" to a different page like "Texas\San Antonio\Cafe" or "Texas\Austin\Restaurant", but using drop downs or autocompletes to select each subpage of the new url. Any ideas on how I could do this? Thanks

No, there's no way to do that. Yaron Koren (talk) 01:09, 22 April 2014 (UTC)Reply[reply]
Well I ended up creating an extension that is a simple parser extension to move pages. Works like #movepage:oldurl|newurl|reason. Not sure if it's worth submitting to MediaWiki, but I would if others want it. Nevertheless it lets me use nice pretty Semantic Forms drop downs and text fields to move pages around. Couldn't be easier for the user, and keeps the page structure tidy. I'm continually amazed at the things that can be pulled off with this extension and Semantic Mediawiki. Thanks again Yaron!

mandatory is ignored for input type=category


I'm using mediawiki 1.21.2 and SemanticForms 2.7.

If I have the input type category the mandatory attribute is ignored. I've found out that this bug was already known in 2009 and should be fixed. Is it back again?

Thanks for your help! --Finswimmer (talk) 13:35, 24 April 2014 (UTC)Reply[reply]

That sounds like a bug... although the "category" input type has actually been deprecated, in favor of "tree". Maybe switching to "tree" will fix the problem? Yaron Koren (talk) 22:05, 24 April 2014 (UTC)Reply[reply]
Thank you for this tip. I've changed it to "tree", but the mandatory attribute is still ignored :( --Finswimmer (talk) 06:42, 25 April 2014 (UTC)Reply[reply]

Alternative icons for radiobuttons - for a checklist. Any suggestions of how to achieve this?

​I'd be grateful of any advice on how to achieve this. It's not clear to me if it's easy or difficult, so I'd like to know what approaches are possible.

Currently I have this as the radio buttons for a checklist:  

Ideally, what I'd like would be more like this:  

Any suggestions?

Fustbariclation (talk)

You might get some traction using the autoedit link. It'd be kind of clunky with page reloads, but you might be able to set it as the target for an image link (never tried before). - Lbillett (talk) 16:29, 25 April 2014 (UTC)Reply[reply]
That's an interesting question. The #autoedit option is clever but it won't work within a form - only outside it. I think you can do it, though, by uploading some custom images (which you pretty much already have) and adding some custom CSS to the page MediaWiki:Common.css. I found one tutorial on customizing radio button inputs via CSS here. I'm curious if this can actually work... Yaron Koren (talk) 16:49, 25 April 2014 (UTC)Reply[reply]

It looks as if it is what I'm looking for - but I'm not clear about how to mix the CSS with the mediawiki form. If the CSS defines an input box, I don't see how to link that to the input box of the semantic form. I can see that, if you want the text of the form to be green, then, in the form you'd put SMW form definition - that's easy. If I have:

|"The first question" {{{field|Question1|input type=radiobutton|mandatory|items=White;Green;Amber;Red|values = N/A,Green,Amber,Red|default=N/A|text-align=right}}}

The 'input type-radiobutton' specifies the input. If you use CSS with HTML 5 you have

<p> <input type="radio" value="male" id="male" name="sex" /> <label for="male">Male</label> </p>

I don't see how to use the second inside the first. Fustbariclation (talk) 20:32, 7 May 2014 (UTC)Reply[reply]

That's a tricky one; I hadn't thought about it fully. SF does assign each radiobutton input an ID (it'll look like "input_...", so you should be able to use that in the CSS page. You'll unfortunately have to change the IDs if you change around the structure of the form, but hopefully this can be made to work. Yaron Koren (talk) 00:56, 8 May 2014 (UTC)Reply[reply]
Thank you, Yaron, I think you've given me the clue I need. I hadn't quite grokked the reason for giving html tag names when setting up templates and forms - this clearly is it! So I'll try linking those HTML IDs to the CSS IDs and see if that does the trick.

Fustbariclation (talk)

Ampersand in Values from

I'm trying to use "values from category=widgets & bobbles", but the ampersand seems to break this. Is there any way around this? I've tried &amp;, %26, and #38; to no use. Appreciate any help on this. :)

What version of Semantic Forms are you using? Yaron Koren (talk) 16:40, 28 April 2014 (UTC)Reply[reply]
Hey Yaron! I'm on 2.7. Works fine if I use a category without an ampersand, but not if there's one in it.
Also, different issue, but how/can you use field properties in a values from? I'm trying to do something like "values from category={{{City}}} {{{State}}} widgets"? Thanks!
Okay, that sounds like a bug. For the second question, is the idea that the possible values are set dynamically, based on what the user has entered in fields called "City" and "State"? For that, you may need to use "values dependent on" - though it only lets you set the value based on one field, so you might need to change the data structure somewhat if you were going to use that. Yaron Koren (talk) 20:39, 30 April 2014 (UTC)Reply[reply]
Ah, kind of figured on both counts. Started panicking about how I was going to get this thing to work, but managed to find a work around for both issues by using SemanticFormsSelect extension. Lucky it just happened to turn up in a search result! Thanks again Yaron.

Empty fields have their template arguments saved on article creation

Hello! (MW 1.21.2/SMW 1.9a3/SF 2.7) Since upgrading from SF 2.5.1 to 2.7, it seems now that when using a form to create an article, any empty form fields get their argument names saved to the article with an empty value. However, editing with a form does not do this. ('show on select' types still get empty argument names saved). Is this expected behavior? Where might I start looking to adjust this? Thanks! - Lbillett (talk) 19:32, 30 April 2014 (UTC)Reply[reply]

Sorry, I don't understand - what's an argument name? Yaron Koren (talk) 20:29, 30 April 2014 (UTC)Reply[reply]
My bad. The template written to the article contains all the field names (what I was calling argument names) even if the field was blank. So if the form has, say, 30 optional fields, but only a couple of them are filled out, the template call is quite long!
 {{My template
 |Arg1=some stuff
 |Arg2=some stuff
Functionally it's no problem. Just stores a lot of unused stuff. - Lbillett (talk) 21:21, 30 April 2014 (UTC)Reply[reply]
Ah, yes, that's a bug. I don't know where it can be fixed - presumably in SF_FormPrinter.php. Yaron Koren (talk) 23:08, 30 April 2014 (UTC)Reply[reply]
Hello Yaron. We noticed this behavior also because the output of our data with Data_Transfer changed. We import an XML dump from our wiki back into a SQL Server database, this import "relied" on the fact that empty properties (the once with no value) where not in the XML, this automatically made them database NULL. This worked because with SF 2.5 using {{#autoedit:... empty properties where not stored on the page and when exported with Data Transfer where not in the resulting XML. Since SF 2.7 they are stored on the page and thus also in the resulting XML output but with an empty string. This is fixed now becuase we changed our SQL code to check for empty properties and if so make them NULL. I think when you don't assign a value to a property it should not be stored on the page. Nothing (NULL) is something different then an empty value for a property. Regards, --Felipe (talk) 08:41, 18 June 2014 (UTC)Reply[reply]
To add to this. The issue that template parameters are printed even if their fields are empty actually dates back a good while before SF 2.7 (I wasn't sure myself if it was a bug or something intentional, or even inevitable). The odd thing about this behaviour is that it's not entirely consistent (for some parameters it doesn't happen), but I haven't able to discover any rhyme or reason to this. It also happens with #autoedit, but that may be a separate issue. Cavila (MW 1.22, MySQL 5.5.37-0, Php 5.4.4-14 squeeze, SMW 1.9.2, SF 2.7) 09:30, 18 June 2014 (UTC)Reply[reply]
It's true that, in databases, null and empty are different things, but in the MediaWiki template world, they're treated the same - it's risky to have different behavior depending on whether or not a parameter exists in the page source, regardless of this SF bug. Still, I do hope to get this bug fixed. Yaron Koren (talk) 12:06, 18 June 2014 (UTC)Reply[reply]

Query String Broken?

When you use "query string=template-name[field-name]=field-value" on a forminput, it's not passed into the form. Everything looks fine in the URL, the field is just blank. I know I had this working fine before, but I haven't checked in a while, and noticed it's broken now. Not sure if it got messed up in an update, or if it's just me?

Is this happening on a public wiki? If not, can you tell me what version of SF you're using, and the query string that shows up in the URL? Sometimes it's a problem of an incorrect capitalization, or an underscore instead of a space, etc. Yaron Koren (talk) 12:56, 16 May 2014 (UTC)Reply[reply]
Well I suppose I fixed the problem. I'm running (Version 2.7)(8ab4f7a), so I downloaded the newest file and did a file compare, and saw there were differences in SF_FormPrinter and SF_Utils. I swapped those files out with the new one, and now it's working again. I'm not sure if the (8ab4f7a) means it was an older version, or if it was bug fix changes. Thanks.
Okay, great. I do hope to release another SF version at some point soon. Yaron Koren (talk) 16:35, 16 May 2014 (UTC)Reply[reply]

Problem with partial form editing multiple-instance templates

I am trying to upgrade a rather complicated SMW wiki. I have managed to get everything else working in the new setup, except for partial forms editing multiple-instance templates. They display nicely and you can add and remove templates and change their order the way it's meant to be, but when you save the form, none of the changes made are applied to the page. No error message (with "error_reporting( -1 );" and "ini_set( 'display_errors', 1 );" set) is given and everything seems to be working ok, but when the page loads after the form edit, it haven't changed at all. There is no new version in the page's history. The amount of templates doesn't affect this.

However, if you remove the "partial form" from the form's definition, it works exactly as it should. I'm kind of stuck here, and really don't know what to do or how to debug. My new setup is running MW 1.22.5, SMW (I'm doing the smwsqlstore2 -> smwsqlstore3 migration in due time) and SF 2.7. My PHP is 5.4.4-14 and MySQL 5.5.35-0. I have no error messages and everything else works great. Can anyone help me? I really need this working. Molindho (talk) 06:28, 22 May 2014 (UTC)Reply[reply]

Partial forms are a feature I'm no longer really supporting, and I actually hope to remove them from SF at some point. My recommendation is to replace any partial form with a "pseudo-partial form" - a form that includes all the templates of the main form for the page, but that only has fields for the one template that that form is supposed to edit - every other template would just have the code "{{{for template|TemplateName}}} {{{end template}}}". Would that work for you? Yaron Koren (talk) 21:43, 21 May 2014 (UTC)Reply[reply]
Ok. It actually works almost exactly the way I had it working with older versions when you just eliminate the partial forms definition. The old partial forms didn't have a free text field, so I guess all the other templates are anyway regarded as free text and hang along, even if they don't show on the form. My page has a main single template and a number of different multiple-instance templates that store data on different types of environmental observations related to lakes (ie. water temperature, algal blooms, water transparency ..). The idea is for users to edit those multiple-instance templates one observation type at a time. The order of the multiple-instance templates in the page is not relevant, since they just store data that is queried in the main template. I originally used partial forms, since that is what I'm doing: editing parts of the page. But I can obviously make it work by just eliminating the partial form definition or by including all the templates in each form for different type of multiple-instance template (observations). The definition "partial forms" doesn't seem to work though, which is good for everyone to know. And thanks a lot for your quick answer. Molindho (talk) 06:28, 22 May 2014 (UTC)Reply[reply]

#formlink print template at top of the page

I need that the form template is printed at the bottom to the page instead at the top... how can i do that?

Put the "free text" input at the top of the form definition. Yaron Koren (talk) 20:43, 23 May 2014 (UTC)Reply[reply]

Query string

Can you give me an example of how can i use the "query string" parameter in a #formlink parser function?

thaks for the previous answer: "Put the "free text" input at the top of the form definition" i'll try that

You can see one example here. Yaron Koren (talk) 21:58, 27 May 2014 (UTC)Reply[reply]

Preventing formedit for a specific page in a category using a form

I am sure that this has been asked before, but somehow I have overlooked the solution in the documentation. Is there a way to specifically exclude a single page from being editable with a form even though the respective category requires editing with a specific form? E.g. I have a category "Plants" collecting plants but I also have a main page on plants called "Plants" in the same category containing the query for all plants added to a wiki as well as some text about plants in general. Editing this page with a form does not make sense and this is why it will be nice to remove formedit from this page. Cheers --[[kgh]] (talk) 14:59, 27 May 2014 (UTC)Reply[reply]

You should have the template, instead of the category, specify the form, by using "Page has default form" instead of the standard "Has default form". Although maybe the better solution is to not have the "Plants" page in the "Plants" category... after all, it'll mess up the query as well. Yaron Koren (talk) 21:59, 27 May 2014 (UTC)Reply[reply]
Ah, yes - sure, this is the way to do it! Probably I should have figured this out myself, so thank you for the (re-)vaccination. :) I think this is purely a Wikipedia style approach to organise the article providing a general overview in the same category as the related pages. Hmm ..., Cheers --[[kgh]] (talk) 08:17, 28 May 2014 (UTC)Reply[reply]

Restricting #autoedit Buttons

I have several autoedit button that I need to restrict. I tried adding the normal |restricted=GroupName but that did not work. Is this possible? Thanks.

--Clifford.kasper (talk) 13:29, 28 May 2014 (UTC)Reply[reply]

Unfortunately, there's no way to directly restrict #autoedit. However, there's another solution that's potentially better anyway, which is to hide the buttons from users who are not in the right groups, using the #ifsysop or #ifingroup functions from the UserFunctions extension. Yaron Koren (talk) 22:59, 30 May 2014 (UTC)Reply[reply]
To add to the above: there's also the {{#ifgroup}} parser from Extension:SimpleSecurity (which comes bundled with MediaWiki). I'm using it for much the same purpose. Cavila (MW 1.22, MySQL 5.5.37-0, Php 5.4.4-14 squeeze, SMW 1.9.2, SF 2.7) 07:21, 2 June 2014 (UTC)Reply[reply]
Extension:SimpleSecurity seems unstable and unmaintained. In what way is it bundled with MediaWiki? Perhaps better to use the UserFunctions extension. -- 08:59, 6 June 2014 (UTC)Reply[reply]
Excellent suggestions. Thanks everyone for your help. I'll give UserFunctions a try. Clifford.kasper (talk) 17:27, 30 June 2014 (UTC)Reply[reply]


Is there any way to make this work with the Drafts extension, or implement another kind of autosave?

I don't know if there's a way to get forms to automatically save to a "Draft" namespace. Other than that, there's the "save and continue" button, though it's not automatic. Yaron Koren (talk) 01:56, 30 May 2014 (UTC)Reply[reply]

I dont necessarily need them to save to a Drafts namespace, the main namespace would be fine. I have this functionality when not using forms, and while not a dealbreaker it would be nice to have an automatic save every x number of seconds. Thanks

Editing an already existing template

Hello. So, I am working on a wiki right now with semantic forms. Originally, I create forms to create all the pages. Now, we have a bot that will upload the data to the wiki with a specific template so that users won't have to create anything.

I thought that I would be able to create a form with the exact same parameters and the exact same template and it would be able to just take the values already on the template and fill the inputs. That however, has not been the case.

Have I gone wrong somewhere? Is it not as simple as having the exact same information? Is there a way in which I can trick the semantic forms into thinking that it was used to create these auto generated pages?

Are you talking about having an "edit with form" tab show up? If so, see here. Yaron Koren (talk) 14:31, 2 June 2014 (UTC)Reply[reply]
No, I have the "Edit with Form" button. I have a page that has be generated with a python script. The page is empty other than the "Entity" template. I created a form using the same template with the same properties and inputs. I just wanted to know if it's possible to make the form read the template already on the page and take the information from that. Right now, it just takes the template already on the page and puts it into the "Free text" section, leaving all the inputs empty.
Are you sure it's the exact same template name in both the pages and the form? The data should really show up in the form, if that were the case. Yaron Koren (talk) 15:29, 2 June 2014 (UTC)Reply[reply]
Here is a page generated with the python script: http://creawiki.net/index.php?title=Harvester ; here is the template: http://creawiki.net/index.php?title=Template:Entity ; here is the form using the exact same template (of course, a few irrelevant frields being removed) http://creawiki.net/index.php?title=Form:Entity ; Despite using the same template, it tells me that the page already exists and it doesn't use that form... am I doing something wrong? I just want the form to be able to edit what's already there, not rebuild it.
Great skin! I don't see what the issue is, though - everything seems to work correctly at the "edit with form" page. Yaron Koren (talk) 19:42, 3 June 2014 (UTC)Reply[reply]

Count of a property multiple times in a page

Hi All

I'm looking at transferring data preiously stored in excel to FreightWiki. Users enter simple data each day, like the table below

Date Correct Comment
05/06/14 Yes Great work
06/06/14 No This was incorrect today due to the weather
07/06/14 Yes

I want to ensure before making a form that I can capture the information afterwards. I need to be able to count how many times the user said Yes or No in the Correct field, and easily view which dates they said yes and no to.

Eg - how many times in May was it a No? and then for what dates?

If the same property is used many times on one page - can you count it? and request the field beside it to be displayed?

Apologies if my question is not clear - I'm still learning!

I assume the idea is that all the data would go on one page, via multiple-instance templates? If so, you should store the data via either subobjects or Semantic Internal Objects - essentially the same thing, on the back-end. Yaron Koren (talk) 00:21, 5 June 2014 (UTC)Reply[reply]

The image is not shown after uploading

Hi everybody, when i add in my form a attribute Page and add this to my form with the parameter uploadable. I can upload a File, but after saving the form, i want that the File or image is shown in created table. At the moment i get a link(http:...../index.php?title=Ab.txt&action=edit&redlink=1) to a nonexsiting page.. I'm sure this is a stupid problem, but i couldn't found a solution yet. Thx alot for your inputs!

Your template probably something like "[[Has image::{{{Image name|}}}]]". It should instead have something like "[[Image:{{{Image name|}}}]] {{#set:Has image=File:{{{Image name|}}}}}". Yaron Koren (talk) 18:35, 5 June 2014 (UTC)Reply[reply]

I tried it with diffrent combinations of your template code(and of many other sites), but it still didn't work :( You can see the basic code on Formt and Template, maybe you can take a look at it and say what it needs futhermore to work.

I undid your last change to the template, and now it seems to work fine, here. By the way, testing is better done at scratchpad.referata.com than at www.referata.com. Yaron Koren (talk) 20:17, 10 June 2014 (UTC)Reply[reply]

You helped my already very much - thx again. There is still a little beautyfault. My code is now: |- {{#if:{{{Lösungsanhang|}}}|! Lösungsanhang {{!}} [[Image:{{{Lösungsanhang|}}}|200px]] {{#set:Daten=File:{{{Lösungsanhang|}}}}}}} |} And the Upload a File window doesn't pop up anymore, since i have #if statements in my template..

The upload window works fine for me... Yaron Koren (talk) 12:28, 24 June 2014 (UTC)Reply[reply]

Autoedit also adds other values - bug or feature?

Hi, it seems that when an autoedit is done on one field also a value is added for a boolean field that has been added in the form and for which the page doesn't have a value. Why is this and should it be considered a bug? I would expect that only the things in the autoedit statement should be changed. --AdSvS (talk) 09:07, 6 June 2014 (UTC)Reply[reply]

How to allow user to enter multiple values of a property


I know SF has a great feature of "Allow for multiple (or zero) instances of this template in the created page". At runtime, a "Add Another" is there...

But what we need is something more simple: Allowing multiple instance of a property, e.g A Student has 0 or multiple phone numbers ( phone number is just a normal property, not class or template). I know that there is arraymap and delimiter but it is not very friendly to users...I would like to have the "Add Another" button instead...

I don't know if it is possible with SF. I would really appreciate if you could give me some hints.

Thank you

You would have to create a new multiple-instance template, holding just that field. The next version of Semantic Forms, by the way, will offer "tokenization" of a list of values - see "Multi-Value Select Boxes" here, for example - which may or may not be good enough for your needs. Yaron Koren (talk) 12:32, 8 June 2014 (UTC)Reply[reply]

Wrong wikitext format using Special:CreateClass

I tried to use Special:CreateClass to create one, The resulting template for infobox has wrong wikitext for list values

| {{#arraymap:{{{Phone Number|}}}|,|x|[[Phone Number::x]]}} }}

The ending "}}" isn't needed.

--Nischayn22 (talk) 09:57, 12 June 2014 (UTC)Reply[reply]

What version of SF are you using? I thought that was fixed at some point, maybe a few months ago. Yaron Koren (talk) 13:49, 12 June 2014 (UTC)Reply[reply]
Using SemanticBundle-20140514.zip which gave me Semantic Forms 2.7 --Nischayn22 (talk) 15:19, 12 June 2014 (UTC)Reply[reply]

Autoedit button broken using SF 2.7 or 2.6.2 in MW 1.22.2

Autoedit button does not work with the above setup. I assume it is broken because of this issue:


Anyone else having this problem and any reason the patch has not been merged into version 2.7?



That change you linked to was merged in June 2013, which means it's been in place since SF 2.5.3; so I doubt that's the issue. Is it a specific #autoedit call that's failing for you, or can you not get #autoedit to work in any circumstances? Yaron Koren (talk) 21:41, 12 June 2014 (UTC)Reply[reply]
We have been using autoedit successfully with SF 2.5.3 and MW 1.20.2. We have been testing SF 2.6.2 and 2.7 with MW 1.22.2 to consider migration. Our implementation is similar to our old setup in terms of syntax and structure. In one instance, we put the autoedit buttons on the target page itself. Using link type=button, the buttons show up but after clicking nothing happens. Using link type=post button, a plain text link shows also with no effect after clicking. When testing the autoedit on a remote page (not on target page), the button shows editing action and indicates that the target page was successfully edited for both link type button and post button. However, inspecting the wikitext, recent changes, and target page history do not show the edit. I thought it was some conflict with our bootstrap chameleon skin but changing the skin to gumaxxd (which works for our older install) does not help. Formlink works fine.

Longphile (talk) 01:25, 13 June 2014 (UTC)Reply[reply]

Just tried SF 2.7 in MW 1.21 and also 1.23. Autoedit is also broken in these other MW versions. Specifically in 1.23, the following error message initially pops up: "Modifying MockupPage failed. Sorry! We could not process your edit due to a loss of session data. Please try again. If it still does not work, try logging out and logging back in." Logging out and logging in again does make autoedit work. Then later on without any tweaking, clicking the autoedit button shows "Successfully modified MockupPage using form Mockup.". But like in MW 1.21 and 1.22.2, there is no actual edit on the target page. Formlink is also broken in MW 1.23 with an already documented bug (https://bugzilla.wikimedia.org/show_bug.cgi?id=64049). Any ideas?

Longphile (talk) 03:16, 13 June 2014 (UTC)Reply[reply]

I tried the latest master version (https://git.wikimedia.org/commit/mediawiki%2Fextensions%2FSemanticForms/41de8012783b8185a20b04ff639c35592a8471a8) which seems to have fixed the autoedit issue. The other formlink bug remains (https://bugzilla.wikimedia.org/show_bug.cgi?id=64049) which shows a number of php errors but does not really affect page saving.

Longphile (talk) 10:46, 20 June 2014 (UTC)Reply[reply]

A short Form to add new section to page. How do I do this ?


what I want is that I can add a template to a given page, that adds a new headline and than a small form, that allows for a Date and a Text to be entered and a submit-button to send the text on it's way. If that happens, the info should be added to the page. Something like this: {{#subobject:-|Deed=Page Forms/Archive April to June 2014|Date={{{Date from the form}}}|Description={{{Text from the form}}} }}

Followed by a list with all the "Deed"-Objects of the current page listed.

How would I make this happen ? Heinrich krebs (talk) 17:19, 17 June 2014 (UTC)Reply[reply]

Are you talking about having a form that would just add on one instance of a multiple-instance template? Unfortunately, that can't be done. Yaron Koren (talk) 18:05, 17 June 2014 (UTC)Reply[reply]

Cancel in form with IE goes back too far

There is code in SF_FormUtils.php that was introduced in change https://gerrit.wikimedia.org/r/#/c/33695/ that causes Cancel to go back two pages rather than one in IE. The extra step does not appear to be necessary in IE 9. I am using a button of the form

{{#formlink:form=Task|tooltip=Add a Task|query string=namespace=Task|link type=button|link text=Add a Task}}

Cindy.cicalese (talk) 13:57, 19 June 2014 (UTC)Reply[reply]

Ah, IE... I don't know. Yaron Koren (talk) 01:06, 26 June 2014 (UTC)Reply[reply]

#forminput parameter maxlength

Hi, does a parameter like maxlength exist for #forminput? I need to restrict the maxlength of the pagetitle to 50 characters. Thx for your help!

No, but that sounds like a good idea. Yaron Koren (talk) 01:06, 26 June 2014 (UTC)Reply[reply]

Query string function

Hi! i can't make it work "query string" in parser function "#formlink"

i have this:

in a page i have

{{#formlink:form=Quote|link text=Add a quote for this author|link type=button|query string=Quote[Author]={{PAGENAME}} }}

  • i hav a form whit this code:
{{{info|page name=<Quote[Author]>_<unique number;start=1>}}}
{{{for template|Quote}}}
{| class="formtable"
! Date
| {{{field|Fecha|input type=date}}}
! Author:
| {{{field|Author}}}
! Menu:
| {{{field|Menu|input type=textarea with autocomplete}}}
{{{end template}}}
  • i have this code in a template page "Template:Quote":

Please help me!

  • i want that when i push de button "Add a quote for this author" it's create a page that is called whit the name of the page where is the button and a consecutive number.

i.e. let's say that i have a page called "main", in that page i have the button "Add a quote for this author" and when i push the button, it send me to the form "Quote" whit the field "Author" filled whit the page name of the page "main" and this form will create a page called "main 1" as an example. And the next time that i push the button that will create a new page called "main 2"

that's what i want

I hope you can help me!! please!!

What does the URL for the form look like, after you get to that form via the #forminput call? Yaron Koren (talk) 14:56, 29 June 2014 (UTC)Reply[reply]

Hi! Yaron!

  • nothing!! when i use that form i have a page called "1" instead of a page called "main 1", the "query string" of the "#formlink" does not change anything...

this code:

query string=Quote[Author]={{PAGENAME}}

must send the PAGENAME to the new page but it does not. The new page must be called "PAGENAME 1".

i want know how can i use the "query string" in the #formlink parser

What do you mean, the URL looks like nothing? Yaron Koren (talk) 22:52, 2 July 2014 (UTC)Reply[reply]


I think, that i need rise the question another time...

i'll try to explain me, i have this code:


{{#formlink:form=Quote|link text=Add a quote for this author|link type=button|query string=Quote[Author]={{PAGENAME}} }}

but it does not work, the "query string" does not send any information to the form, i don't know why.

in the same page i have this code below


{{#autoedit:form=Quote|link type=button|link text=Modify Author|query string=Quote[Author]=Mark|target={{FULLPAGENAME}}|summary=Modify author }}

whit this code the "query string" works and sends the information,

i want to know what i've done wrong in the first case. why does not work "query string" in the first code?.

thanks man!

You're supplying all sorts of information that's not relevant. Please just answer my questions - specifically, what does the URL look like after you click on the #formlink button? Does it contain the words "Quote" or "Author"? Yaron Koren (talk) 22:40, 3 July 2014 (UTC)Reply[reply]


yes, the URL yes, looks like this after i click the button #formlink:

The URL contains the words "Quote" and "Author"

the name of my wiki is : atcaresdemo

the the "pagename" is: Pruebas

The form name is: Quote

The template name is: Quote

The variable is: Author

That URL looks correct... does the "Author" field show up as blank, or does any text appear in it? Yaron Koren (talk) 00:01, 4 July 2014 (UTC)Reply[reply]


The "Author" field appears as blank. No data

Is there any way you could create an account for me on that wiki, and send the username and password to yaron57@gmail.com? That might make debugging easier. Also, note how no one else here creates a new subsection for each response. Yaron Koren (talk) 22:14, 4 July 2014 (UTC)Reply[reply]

of course i'll create an account for you on my wiki at this moment.... OK sorry about the subsections! NOTE:my wiki is in spanish. I hope that's not a problem.

Your account is ready! please confirm from your mail.

this is the link where i've the example.

Link to the example

Okay, great. The Spanish is not a problem. Could you add me to the "Atcares" group? Yaron Koren (talk) 23:46, 4 July 2014 (UTC)Reply[reply]

of course... ready, i already added to the "Atcares" group. Sorry for doing so far, but on the weekend i could not.

Okay, thanks. This is very strange - I tried it out, and Semantic Forms seems to be ignoring the query string almost completely. Have the SF code, or core MediaWiki, on your site been modified in any way? Yaron Koren (talk) 23:21, 7 July 2014 (UTC)Reply[reply]

maybe, i'm not pretty sure, my old programer modified some extensions, i´m going to take a look at the SF code. The strange is that the "query string" works for "#autoedit" but does not work for "#formlink" or "forminput"... anyway i'm pretty greatful by your help. if the SF code it's fine, have you any idea that what's happening?

No. Yaron Koren (talk) 15:25, 8 July 2014 (UTC)Reply[reply]
Return to "Page Forms/Archive April to June 2014" page.