Extension talk:Page Forms

Stuck when using Special:CreateForm
I followed the QuickStart guide and successfully created properties and templates. Now I want to create a form via Special:CreateForm. After I choose my template and click "Add" I'm transfered to another page saying "Before template:" and a drop down menu with the 2 choices "At end" and "Template_name". I have three buttons "Add", "Save page" and "Preview" but none of them takes action if clicked.

Can you please help?

Thanks in advance!

BTW: http://scratchpad.referata.com/wiki/Special:CreateForm shows the same faulty behavior. --Stefahn (talk) 11:53, 4 September 2012 (UTC)


 * Thanks for pointing that out. That's too bad... it was just a single missing '.', due to a change made last week. I just fixed it in Git, and updated the code in Referata. I guess I'll have to release a new SF version too... Yaron Koren (talk) 15:52, 4 September 2012 (UTC)


 * Thanks for your quick reply, Yaron! Now it works fine. Also, I finally got a Git GUI working for windows :) Stefahn (talk) 23:33, 4 September 2012 (UTC)


 * Thanks indeed. Some problem and same solution, only that Git is working on my Mac ;-). One question though: the list of templates appears in some random order when I want to add a template to the form. Shouldn't that be alphabetically? --AdSvS (talk) 13:14, 6 September 2012 (UTC)


 * They're showing up for me in alphabetical order - can you point to some place where they don't show up that way? Yaron Koren (talk) 14:45, 9 September 2012 (UTC)
 * After having installed the SF version with the 'CreateForm' problem and an updated version after that, the list was in seemingly random order. After creating another template it was ok again. I'm not going to be able to reproduce this one and also couldn't make a screenshot with the list shown, so let's forget about it! --AdSvS (talk) 14:38, 17 September 2012 (UTC)


 * I have the same problem where was the missing "." in the code. I can not reach git for some reason and I could only download the tar.gz version and it is not corrected there. Could you tell me the exact location of the missing "." or update tar.gz file. Thanks in advance. Nephantes (talk) 17:59, 21 September 2012 (UTC)

Good point; I just updated the download link (something I should have done a while ago). Yaron Koren (talk) 20:52, 21 September 2012 (UTC)

Namespace declaration ignored if postbutton method is used?
In relation to archived discussion:.

I've found that the "namespace=" declaration is ignored when using the postbutton method? Ashimema (talk) 13:53, 6 September 2012 (UTC)

Info tooltip does not work in multiple instance templates
I use the following text next to a field which is in a multiple-instance template. When you view the form, the tool tip (?) icon shows next the field, but the tool tip bubble doesn't open when you click on it. I tried to open multiple instances of the template and the tool tip does not load the bubble. I have tried this with a field that does not have multiple instances in the same form and the tool tip loads the tool tip bubble.

Here is my template call within the Form Syntax

The preceding message was posted by User:81.104.213.79 on 9 September 2012
 * I can confirm this behaviour. Cavila MW 1.17, MySQL 5.5.23, Php 5.3.10, SMW 1.7.1 14:29, 9 September 2012 (UTC)

Does anyone know a solution to this? --81.104.213.79 11:02, 14 September 2012 (UTC)

Semantic Forms
Hi,

I am using semantic forms. I need to bring some of the fields to the first page with validation and also i want to send these values through url to next page.

Kindly help me to solve this problem. Reply me as soon as possible.


 * This is the right spot. :) "Spamming" a question to all sorts of locations does not help the cause. Signing your question is probably a good idea too. Cheers --&#91;&#91;kgh&#93;&#93; (talk) 14:41, 12 September 2012 (UTC)


 * This may possibly help. And yes, please stop spamming. :) Yaron Koren (talk) 02:29, 13 September 2012 (UTC)

A lot of "Allows value's" in Combobox
Hello, I am trying to do the following. The  is filled with data from a table on the MySQL instance. With the help of the External Data extension it fills all Allowed values with customer names. After saving the page there is a nice list of all the customers (+/- 800). When you press Browse properties on the property pages all customers are listed behind Allows value. All seems fine. This is a property of type Has type::Page.

With the form and template below I then create a new page and expect to see all customers listed in the Combobox that are on the  page but it only shows +/- 240 randomly from A to Y. Always the same customers are shown but never all of them.



When I do the same thing with a smaller result set (+/- 40) it works fine. I can't find any SMW setting's limiting the amount of Allows value's for a property. I am not sure what is going on here. If it would show the first 200 it would make sense but as it is now it is a little confusing. It would be very nice if I could get this to work with a bigger result set, is there a trick to get it to work or is this just to much? Thanks --Jongfeli (talk) 14:13, 12 September 2012 (UTC)


 * 800 is a lot of values! Of course, ideally it should work, but given that you're using a combobox, an alternate solution is to use "autocomplete from url" - it's less of a hack. Unfortunately, it's also harder to set up (something I hope to change), but if you can create an API script that displays the table contents in JSON form, that's what I would definitely recommend. Yaron Koren (talk) 02:20, 13 September 2012 (UTC)


 * Ok Yaron, thanks for your quick responds. I did some more testing and I think I found the problem (I created the problem myself). On the template that is used by the from there was no reference to . In the template I also use the External Data extension to fill in some data. This means Semantic Forms works fine with External Data and a lot of "Allows value's"! My "mistake", I must say it takes a while before you get the grips on a Semantic Wiki and Semantic Forms but I am learning.


 * I will do some tests to see what happens:
 * I need to assign  to   but when it is not there use the data from the External Data extension.
 * Look at the location of, when it works it is at the beginning of the template and not inside a.


 * For your reference, it works with the following extension versions (we are using the alpha versions because we want to try out the new graph functionality):
 * OS Windows Server 2003
 * MediaWiki 	1.19.2
 * PHP 	5.3.8 (apache2handler)
 * MySQL 	5.5.19
 * Semantic Forms (Version 2.4.2)
 * Semantic MediaWiki (Version 1.8 alpha)
 * Semantic Result Formats (Version 1.8 alpha)
 * Validator (Version 0.5 alpha)


 * When downloading the .tgz from Extension:Semantic Forms I still have the problem described in Stuck when using Special:CreateForm. When you take a snapshot from git it works fine. --Jongfeli (talk) 10:27, 13 September 2012 (UTC)


 * It works in a normal "table" and a . The syntax is the same except for the pipe. Problem solved.
 * Normal Table
 * --Jongfeli (talk) 11:58, 13 September 2012 (UTC)
 * --Jongfeli (talk) 11:58, 13 September 2012 (UTC)
 * --Jongfeli (talk) 11:58, 13 September 2012 (UTC)

WYSIWYG with SF 2.3.2
Hello,

I have a problem with the WYSIWYG editor (the one based on CKEditor) when using semantic forms 2.3.2. I have applied the relevant patch for it but it still won't show up. I have both SMW and SMW+ installed. Could this be a cause? Many thanks, Adrian.


 * Hi - sorry, I know very little about SMW+, or the WYSIWYG extension. Maybe other people reading this can help, though. Yaron Koren (talk) 12:28, 13 September 2012 (UTC)

Query parameters not passed
Hi, I'm having some problems with query parameters in a function. First I passed the parameters (6 of them) as a query string. Problem: the first one is not passed. Something peculiar about the first parameter in the URL string: the '=' between first parameter and value is replaced by '%3D'. For other parameters there is a plain '=' in the string.

When I passed the parameters as separate parameters, only the first one (that wasn't passed to the form before) was passed and the others were not. From the documentation It appears that all parameters can be provided separately.

It is a Dutch wiki with SF 2.5 and all versions up-to-date. Are there some limitations or conditions to the use of parameters that I'm not aware of? --AdSvS (talk) 15:23, 17 September 2012 (UTC)


 * I'm definitely not aware of this problem. Could you reproduce it on a public wiki? Yaron Koren (talk) 18:08, 17 September 2012 (UTC)


 * If you have a look on http://gbv.wikibase.nl/index.php/Testpagina you will see what I mean. The three links are essentially the same. The first has one parameter with the whole string (which works fine by the way, so I'm happy that my problem is solved!), the second the same string with 'query string=' added and the third with separate parameters. The results are different and only the first one gives a good result. I haven't been able to reproduce it on other wiki's, so something strange is going on. --AdSvS (talk) 07:46, 18 September 2012 (UTC)


 * Okay, thanks. My guess is that this is because you're using the old way of calling #formlink - without named parameters. Could you try switching to using named parameters for everything? Yaron Koren (talk) 12:39, 18 September 2012 (UTC)


 * Indeed you're right. I have used named parameters in both situations, with one query string and with all separate parameters, and both work well now. --AdSvS (talk) 13:12, 18 September 2012 (UTC)

Query forms, problem with empty fields
Hello. I've created a query form with lots of fields (all of which are properties) where the user can fill in values for one or more fields and the rest will be ignored. However, the query doesn't seem to work unless the user fills in all fields. E.g. I have a form containing the fields Country and Basin, which are also properties in the wiki (strings, with a set of allowed values). In the template I write the following query:

If I select values for both fields the query works fine, but if I only select country, the value for Basin in the query will be "" which is obviously not in the list of allowed values. How can I make the query ignore any fields which the user don't select in the field? (I saw someone suggesting to use Basin:: instead, but that seems to break the query parsing, as pipe has another meaning. I also tried escaping the pipe (with "&amp;#124;") or using Template:! but without success.) MathiasLidal (talk) 11:56, 20 September 2012 (UTC)


 * Just use the parser function "if":

missing, easy to loose track of all the curly braces...:)


 * MathiasLidal (talk) 11:56, 20 September 2012 (UTC)


 * For what it's worth, I believe just adding the pipes to the template parameters in the original query would have also worked. Yaron Koren (talk) 12:51, 20 September 2012 (UTC)

More on Embed in field / holds template
Two things: Cavila MW 1.17, MySQL 5.5.23, Php 5.3.10, SMW 1.7.1 09:31, 21 September 2012 (UTC)
 * There may be a bug: once you've hit "save and continue", it appears that new instances of the embedded multi-instance form cannot be edited. The fields become 'locked', as it were.
 * I've experienced some issues when you have about 30+ instances on a page (even if the page itself is under 8,000 bytes). Attempts to save the page can fail at times. Would it be fair to say that regular (non-embedded) multi-instance forms are a little more solid in this respect?
 * Guess what? The second issue above can serve as a solution for the first one! When those fields become frozen, you can attempt to save the page using "Save". What happens instead is that the form is reloaded with the last saved revision and the fields that were previously unusable can now be filled in. How's that for turning bugs into advantages? Cavila MW 1.17, MySQL 5.5.23, Php 5.3.10, SMW 1.7.1 10:28, 21 September 2012 (UTC)

Semantic Forms Hooks
Hi Yaron, Is there any possibility of a hook similar to the MW hook AlternateEdit - an ability to intercept the loading of the edit form. Currently, I'm subclassing SFFormEditAction, overwriting the 'formedit' property of $wgActions to point at my subclass, and overloading the show method, but doing so seems like asking for trouble down the road.

Is there any documentation on the hooks that SF provides?

Using one form to create multiple pages?
I was wondering if it's possible to use semantic forms to create *two* separate pages using the same inputs.

I am using a form in order to create a bibliographic entry for academic articles and my form therefore asks for PaperTitle, tab-delimited AuthorNames, Year, and an article summary. My form then creates a page whose title is equal to the PaperTitle and I then use a template for that article. I also use #arraymap on authors so as to define multiple values for the property author.

Upon submitting the form, I would like to create a second page that links to the first page and is titled "AuthorLastName1, AuthorLastName2, AuthorLastName3 (Year)". This would allow users of the wiki to find the main page by looking it through article title and also by Author-Year.

Is anything like this possible with SMW? If not, are there any potential workarounds anyone can think of?

Thanks in advance, Dana
 * Just the other day I was searching the archive to see if a similar question had been asked and addressed, but I couldn't find anything. The scenario that I was thinking of myself is a form with which to create a series of pages for journal articles (which may or may not belong to the same journal volume). It would be so much easier and less time-consuming if these pages can be created in one form, but unfortunately, I don't think this is possible. (Sometimes what I've chosen to do instead is to create CSV files and import them to the site.)
 * Dana, if you need to create a lot of pages that share the same data (not in a single form though), you can define default values in the form. See the documentation. If other users complain that they don't need those defaults, you could create an alternative 'preliminary' form just for the creation of those pages with some of the default values defined in it. Cavila MW 1.17, MySQL 5.5.23, Php 5.3.10, SMW 1.7.1 08:32, 23 September 2012 (UTC)