Extension talk:Page Forms

Forminput size

 * I'm having a problem with the size argument on #forminput. It does not seem to affect anything on the #forminput inputbox.  Running 1.8.8.  I'd like to make it 0. so I have just a button that calls the form with  as the default.  That way I can have buttons on the page for each infobox template to let the user just click and use the form to edit the properties without ever going into ugly edit mode.


 * You should use #formlink instead. Yaron Koren 16:19, 1 March 2010 (UTC)

MW Version error (Class HTMLTextField not defined)
In "includes/SF_GlobalFunctions.php" there is the following lines (83-90): I installed SemanticForms with MediaWiki version 1.15.1. The wiki uses several other extensions too, and it seems (yes, it was unlikely to happen, but it happened) that one of them defines an 'HTMLForm' class... So SemanticForms loaded the upload class designed for MW 1.16 — which leaded to a fatal error, since "HTMLTextField" was not defined.

I propose to rely on MW's "$wgVersion" variable instead of checking for a class definition: This worked fine for me (I'll update this post if I find the extension which defines an "HTMLForm" class. Alvinos 13:01, 8 March 2010 (UTC)


 * I found it! The guilty one is "SpecialDeleteOldRevisions2". To make the old version "SpecialDeleteOldRevisions" compatible with MW > 1.12, they just bundled the old file "HTMLForm.php" with their extension... Pathetic.


 * Ah, good to know. Unfortunately, checking by MW version is perilous too, because different people use different SVN versions, so there's no direct correspondence between MW versions and whether that class is in there. I could change the code to check for 'HTMLTextField' instead, though... Yaron Koren 15:17, 8 March 2010 (UTC)


 * I changed it to check for 'HTMLTextField' in version 1.9; hopefully that works better... Yaron Koren 14:19, 11 March 2010 (UTC)

Sub-properties
Hi Yaron and all:

I have a question regarding the use of Sub-properties within SMW (http://semantic-mediawiki.org/wiki/Property:Subproperty_of). I have set up some sub-properties, and I have added them to my template that my form uses.

I dont see the sub properties show up on the form or on my Drill Down. Is this by design? is there anyway to get them to show up? Thanks,

Dave Manzolillo DManzolillo@gmail.com

formlink
I don't know if I am using #formlink the way it was meant to be used, but I had a hard time figuring out how to pass the page name using formlink. I tried default value=page_name, query string=title=page_name and query string=target=page_name. None of those worked.

I ended up using

which works, but I don't know if I am using it the way it was meant to be used or if I just tricked it. I'm using 1.9 which uses Special:FormEdit instead of Special:AddData or Special:EditData. Don't know if that makes a difference. I hope my approach will continue to work in future versions.

Specifically I was trying to use it to create a subpage

Dmoorevtedu 14:05, 15 March 2010 (UTC)


 * Hi - if you know the page name ahead of time, then the best solution is not to use #formlink, but to use this approach. Its advantage (besides the fact that it's not a hack :) ) is that it'll show up as a regular link after the page is created. Yaron Koren 15:16, 15 March 2010 (UTC)
 * Yes but what if you want to preload data? I have preloading working with Dmoorevtedu's hack, but of course one would have to hide the button/link if the page has already been created.  217.151.109.252 22:41, 17 March 2010 (UTC) (Bob)

Floatbox Not Appearing?
I hope I am missing something obvious and silly here. I have the same behaviour on two different wikis, one at 1.14 and a brand new one at 1.15

Here is my form. If you add a new page, and attempt to upload a photo, you are brought to a new page instead of seeing the Floatbox.

I have no errors in PHP, or apache...not sure where to start here. Has anyone seen this? Thanks! --John Thomson 01:38, 23 March 2010 (UTC)


 * I like the domain name. :) The issue is that all the references to CSS and JS files in the source code are incorrect - somehow, $wgScriptPath in LocalSettings.php is being set to "/wiki" instead of "/mw". Yaron Koren 03:56, 23 March 2010 (UTC)


 * Thanks on both counts, Yaron! I have two wikis on that server, one at "/" (of my Document Root), and the 1.15 instance in "/mw".  Both LocalSettings *appear* to have the correct value ("", and "/mw", respectively).  Changing the value of $wgScriptPath has catastrophic effects on the rest of the wiki and extensions, of course.  My only recourse now is to hack through the code and hard-code the paths to the JS and CSS files, and while that has netted me some improvements, it is still not working properly...my skin "greys out" as though the floatbox is about to appear, then nothing.  Unless you have another suggestion?  How were you able to determine that $wgScriptPath was set to"/wiki"?  Thanks again for the prompt assistance, it is much appreciated!  ITM, I will keep futzing... --John Thomson 12:34, 23 March 2010 (UTC)


 * Hi - you just have to check the HTML source; any instance of "/wiki" there is probably a mistake. Yaron Koren 14:12, 23 March 2010 (UTC)


 * I ended up symlinking my root to "wiki" just to get past this, and it worked. Thanks again for your help! --John Thomson 15:37, 23 March 2010 (UTC)

Hi Yaron, I was just having the same issue and saw this post..it turned out that it somehow added the /wiki path also. All other extensions render the same. I just wanted you to know that it was not an isolated incident. I ended up going in and hard coding the path in SF_Utils --Demetelski 22:38, 3 April 2010 (UTC)


 * Perhaps you just don't have any other extensions that use $wgScriptPath? The problem definitely isn't coming from Semantic Forms. Yaron Koren 03:18, 4 April 2010 (UTC)

Using Wikilinks In Form Submission
Hi All,

I am having a hard time figuring out what my problem is here...when I add a wikilink like Main page in a form submission, it tends to hose the previous text in that text area...

--John Thomson 14:57, 27 March 2010 (UTC)
 * All is well, I eventually found out about this:

$smwgLinksInValues = true; --John Thomson 15:36, 27 March 2010 (UTC)

Modifying input type=categories?
Hi..I have placed the array of a category in my form in order for the user to check off which to include in the page. A couple of questions..1) I have the form results set to show as the right-hand box but it does not display the data from the checked off category boxes. I would have though that it would display the checked off categories and then have them as a link in the box? 2) If this is not the case is there another way for users to select multiple categories and have them display? Thanks..Deon

One other issue...I was testing out forms...I created a form Lessons and then deleted it..I then created a form Lesson and now when I click edit with form it keeps taking me back to the Lessons form with the message Error: no form page was found at Lessons even though I created it with the Lesson form. Ideas? Thanks.


 * Hi - for the first issue: do the category names show up correctly in the page source? If so, you probably just need to fix the #arraymap call in the template. For the second issue: you need to replace "Lessons" with "Lesson" in the category page. Yaron Koren 15:31, 30 March 2010 (UTC)

Hi Yaron, Yes, the category names show up in the source but do not show on the page..here is the code I used

Thanks, Deon


 * Yes, but what code did you use in the template? That's the issue. 16:58, 30 March 2010 (UTC)

I just added that code to the form under the template..I didn't do it through the create template page because I didn't see a way to set the property for this.


 * It sounds like you have some misunderstandings about how forms, templates and categories work together. I'd recommend playing around with it more, and reading more of the SF documentation. Yaron Koren 18:30, 30 March 2010 (UTC)'

Ok figured it out and now adds to the categories I want. One question which I am not sure if it can do it because I see that the example form doesn't display it either. Besides the categories being displayed on the bottom can the text of each category show next to the field? On the example page the commas are there but no text. Thanks to anyone. --Demetelski 15:45, 31 March 2010 (UTC)


 * That's great to hear. Yes, you can have both - in the #arraymap call, instead of just "", you should have " Category::x" . Yaron Koren 16:08, 31 March 2010 (UTC)

One question and one issue
Hi,

So first what I think is a bug..In my form if a user tries to create a bullet with the wiki (*) as the first input character it will not show the bullet but the asterisk, but the next line with a bullet will show.

The next question I have is I have 2 templates one is set as the right-side box and the other in the page. I was wondering if I can have the right-side box not automatically take the title of the page but if I can specify it or change code somewhere. I have looked but can't find anything..might have missed it. Thanks --Demetelski 14:40, 3 April 2010 (UTC)


 * Hi - the first one isn't really a bug; you just need to put that field on the line below whatever's right before it in the template; MediaWiki doesn't recognize an asterisk as a "bullet" unless it's the first thing on the line. For the second issue, look in the right-hand-side template for something that looks like " ", and change that to whatever you want. Yaron Koren 03:16, 4 April 2010 (UTC)

Input type = checkbox, default=checked?
Is it possible to define a checkbox in a form where it defaults to being checked? I tried setting input type=checkbox (which works), but default=checked doesn't seem to work. --Gkullberg 15:20, 5 April 2010 (UTC)

Upgraded to SMW 1.5.0 and SF 1.9, but now setting the default to now on a date-type input literally puts in the word now. Wazzup with that?