Extension talk:Simple Forms

Actually work?
Does this actually work?? I can't get it to do anything other show the full URL. --198.70.22.217 20:16, 27 April 2007 (UTC)
 * It's still in development, I'll add a message to say it's not ready. —The preceding unsigned comment was added by Nad (talk • contribs) 13:50, April 27, 2007. Please sign your posts!
 * See demo for an example --Zven 01:22, 30 April 2007 (UTC)

Anything new?
Anything new with this extension? I see that the code listed on the organic website has some errors in it. The article creation part would be wonderful for those who don't want to use semantic forms. --72.21.245.86 07:57, 27 May 2007 (UTC)
 * Bug fixed - I'll hopefully get some time to work on it again soon, currently it allows forms to be created and query-string items to be processed as in this example. --Nad 09:12, 27 May 2007 (UTC)

An idea to think about
What if there was an easy way to add another type of input verses text for the create article part of this extension? Like if you were able to use another extension as an input, like some form of media, .gif, .mp3, .wav, .flv, ext... --198.70.22.217 14:36, 5 June 2007 (UTC)
 * Sounds interesting, but not quite sure what you mean.... you mean like an input type that can work like an upload form? --Nad 21:35, 6 June 2007 (UTC)


 * Yeah, basically like an upload form. If someone wanted to upload a media file of some sort, I would say that videos would be most widely used, but others as well. That could be in one input type and then maybe some text in another input type describing it.


 * Another thought is to allow wikitext in the input. I have no idea how difficult that would be, but that way if someone wanted to use one of the media input extensions out there as the input, like one of the .flv extensions that uses outside sites like a youtube they could instead of actually uploading a file. Both ways could useful, but I'm not sure how doable it is allow wikitext. Maybe only allow some pre-defined extensions? Or just use similar functionality of the other extensions in this one as an input type.


 * And then to take it even a step further, use templates with the form using these different types of input. Haha, I guess all this doesnt make them to "simple" anymore! I just think there is room for a great form extension for Mediawiki and I'm surprised that after this long that not to many have went that route.--75.73.16.68 00:12, 7 June 2007 (UTC)
 * Yeah I've wondered why forms haven't really taken off in mediawiki too. I think the youtube functionality you describe sounds more like extending the template embedding functionality rather than forms, which I'm also working on in another extension called Extension:Livelets. I have made the #input parser-function easy to add new kinds of input to so after it's up and running I'll have a look at getting it to do some more exotic functionality. --Nad 02:06, 7 June 2007 (UTC)
 * I agree, I think that extending the template functionality would be key. The main thing I guess I'm trying to get at would be: When creating a new article, the user would have the option to add thier video or whatever right from the form along with text fields, etc... I know this is done at www.wikioutdoors.com. They have some sort of a forms entry that allows the user to choose an image for the article in question based on a template. Maybe the livelets works something like that? --72.21.245.86 03:56, 11 June 2007 (UTC)

Ajax configuration
$wgSimpleFormsUseAjax appears to be a configuration setting in Extension:Simple Forms and a variable in LocalSettings.php. Is the first one in the configuration file a logical only, and the second picked up to specify the path of mootools? --Zven 03:05, 26 June 2007 (UTC)
 * Disregard that, the configuration defaults in Extension:Simple Forms are overridden with configuration changes in LocalSettings.php --Zven 00:05, 28 June 2007 (UTC)

Edit functionality??
Version 0.3.2 (2007-07-09): Removed special-page and #edit parser-function, SimpleForms will not be implementing these
 * This seemed like one of the best features of the extension! Thats too bad it is no longer going to be implemented.... --198.70.22.217 19:36, 9 July 2007 (UTC)
 * SimpleForms can still edit articles in the ways shown in the examples, but will not be implmenting the #edit parser-function or special-page for interfacing to structured data (this feature had not been implemented yet). SemanticForms is the best solution for handling structured data, so it is a waste of effort re-implementing functionality which already exists --Nad 22:21, 9 July 2007 (UTC)
 * I still see a huge benefit to having this extension include the edit/create page functionality. It doesnt require semantic mediawiki for one, but it can viewed as a simple form. Whereas semantic forms, a great extention, dont get me wrong, but it has lots of overhead where this great extension could be a more user friendly form experience.  --72.21.245.86 17:29, 15 July 2007 (UTC)

use tables for widget arrangement
As also mentioned on your user page at organic design, I have trouble when using a wiki table within th ebody of a #form. To achieve acceptable layout the use of tables would really be helpful. See.
 * Thanks, Algorithmix 14:24, 26 July 2007 (UTC)


 * I agree. Not being able to use tables essentially makes Simple Forms useless to me. :/ —Eep² 07:22, 4 September 2007 (UTC)


 * I have this problem:

Test

The form is rendered as "action="/wiki/index.php" id="sf-46efb375c8fcf"> after the text-entry field. —Eek 11:18, 18 September 2007 (UTC)


 * There was a bug preventing a form from having only a single input item in it, which is fixed now (version 0.3.10). --Nad 21:02, 18 September 2007 (UTC)


 * Thanks; that fixed it. —Eek 21:41, 18 September 2007 (UTC)

Error Message
I get an error message after i have installed per the instructions: Undefined index: action in ... SimpleForms.php on line 106. Any idea as to what might cause that?
 * It's because you've got your PHP set to super-pedantic, so that trying to read array entries that don't exist raises an error instead of returning a default null result. I've made a minor update which should fix it. --Nad 22:08, 2 August 2007 (UTC)


 * What about the fatal error above? -Eep² 04:49, 3 August 2007 (UTC)

AJAX-enabled Simple Forms with WikEd - having a problem
I've set up my MediaWiki to utilize WikEd, but when I enable Ajax with motools, a line of text appears between MediaWiki's edit buttons and WikEd's edit buttons that just repeats the word "undefined" over and over again (trailing off the right side of the window). The cursor changes to the "link hand" icon when rolling over it, but the link simply points to http://mySite/undefined. When I disable WikEd or AJAX for simple forms, the text goes away. It appears to be some conflict between the javascript libraries - maybe an overloaded variable or function? Everything works fine though - but I can't leave that string of text there for everyone to see. Any ideas?


 * I have this same problem but just with Simple Forms installed and Mootools enabled with it. See http://www.organicdesign.co.nz/Talk:Extension:SimpleForms.php#Bugs for more info. —Eep² 01:30, 21 August 2007 (UTC)


 * I just upgraded to MediaWiki version 1.11 and the problem seems to be resolved. Give it a try. Funnyman22 20:56, 12 September 2007 (UTC)
 * That undefinedundefined problem is a bug in wikibits.js prior to MW1.10, see Mootools --Nad 22:11, 12 September 2007 (UTC)

Page creation bug
hello, i have tested the extension and i am very happy with it. But I have a problem that it is not possible for me to create new articles.

Also the test Blog example doesn't work on my wiki. I can only post comments with this form when there is already a discussion page, otherwise nothing happens. ----stp-- 13:36, 20 July 2007 (UTC)
 * I'll get these bugs fixed as soon as I get some time. --Nad 21:19, 20 July 2007 (UTC)
 * Thanks, I will be very grateful If you can fix this bug. Please post here a comment if you have solved the problem ----stp-- 07:28, 23 July 2007 (UTC)

Hi, I have some problems to create a new page. The extensions works (BlogExample) but I can't create a new page. Can you submit a short example how to do? The form should be in Template and the page should go to the namespace KB: Thanks
 * There's a bug with the page-creation currently which I'll look into as soon as I get some time to work on it again. --Nad 02:29, 24 August 2007 (UTC)
 * The page-creation bug has been found and fixed. --Nad 11:48, 27 August 2007 (UTC)

Creating new page (part2)
Hello,

Could you give me an short example how to create a new page? Unfortunately with the examples I'm stuck (ok I'm a newbie). I only need 2 fields and the text from one of them should be the title of the page but it should also appear as text in the body

Thanks --DJO 83.135.249.174 12:47, 28 August 2007 (UTC)
 * If you just want to make a link that creates a new page with the content being the same as the title, the URL of the link can be:
 * /wiki/index.php?title=foo&content=foo
 * A slightly better way of generating the url which is independent of wiki configuration is
 *  
 * If the URL needs to be done using Ajax, then have a look at Blog example which creates a new page if it doesn't exist or edits it if it does. --Nad 19:55, 28 August 2007 (UTC)
 * Thank you for the explanation but I didn't get the trick. Let us take the blog example. I have put this in a template called Template:New3. In this template you have the possibility to enter a heading and other information. When the user has filled out the fileds and click the submit button a new page should created in another namespace where the title of the page is the value from the Heading field. The data from the Heading field should be also (and the rest) as text in this new page. The namespace I can change, not the problem. But what is the following parameter? You have in the example Talk: . What is the trick to change this?
 * See Create article example for the simplest way of creating a new article with SimpleForms, also you should probably download the latest version as some minor bugs have been fixed which may affect it. --Nad 13:03, 29 August 2007 (UTC)
 * Now it woks as I want. Thank you very much for your help

Selected select and other input types
How can I get a select list option to be selected by default? Also, a checkbox checked by default, radio button selected by default, default text in a textarea, etc. —Eep² 04:38, 4 September 2007 (UTC)
 * Set the value property in a select list to the default value. Same with radio and checkbox.

Multiple values with Select input
How can I receive multiple values with an input field of type Select? With option "multiple=1" several values can be selected but only the first item in the list is always passed over e.g. to an evaluating java expression (such as "document.getElementById('SeveralValues').value").
 * Multiple selects aren't done yet. --Nad 07:42, 14 September 2007 (UTC)

Form failure with IE
Hi Nad! The form stored here can work with firefox but has malfunction with IE. I don't know what is the cause. Could you give me a hand?--Roc michael 12:51, 17 September 2007 (UTC)
 * The only windows machine I have is running IE7 and the form looked the same as on firefox. There seems to be a problem though because it's showing an unmatched double-brace below the form, and yet all the brackets in the wikitext match. I'd suggest asking Gero if he would upgrade to the latest version as he's running a version that's a couple of months old and some of the bug-fixes since then may solve the problem. --Nad 21:43, 18 September 2007 (UTC)
 * Thanks! Nad. It's works with both IE and FF.--Roc michael 14:13, 19 September 2007 (UTC)
 * Good error spotting - I used a test-editor with matching-bracket-highlighting and still missed that mistake! It would still be a good idea to upgrade though as quite a few bugs have been fixed since 0.3.3 --Nad 21:47, 19 September 2007 (UTC)

Produces Entities If Used in an #if condition
Got the login example working nicely, but placing it inside an #if condition to detect if the user was logged in or not caused the form html to be produced with entities instead of tags, so i saw in the browser what i wanted in the source.

-129.12.38.148 15:29, 17 September 2007 (UTC)
 * I need to redo the way it renders to allow forms to work inside other parser-functions, this is a priority though so hopefully will be fixed soon. --Nad 21:05, 18 September 2007 (UTC)

Other submission input types and "select" lists
Is there a way to have an input type other than a button act as a submission method? Specifically, I want to create a select list that updates another select list based on the first select list's selection. Is this possible with Simple Forms currently?
 * I'll make a dynamic select-list example at some stage, mean time you should be able to add some javascript to the select's onChange event --Nad 21:51, 19 September 2007 (UTC)

I also want to allow for multiple select lists (like Semantic Forms can do--but preferably without requiring a template for each field) that will be automatically named ("select1", "select2", etc) as they are created (and removed if not in sequence, renaming/reordering apporpriately) without having to resort to long lists of checkboxes, radio buttons, or multi-select lists (because I want a text-entry field for each single selection). Thanks —Eek 21:44, 18 September 2007 (UTC)
 * Multi-selects aren't done yet --Nad 21:51, 19 September 2007 (UTC)

textarea cols not applied
Adding parameter cols=30 to does not result in correct sizing, and instead fills textarea to full measure. Problem exists on two separate installations, mediawiki v1.7 at work (Apache2 on Solaris 10) and mediawiki 1.10 at home (Apache2 on Kubuntu 7.04). Can set textarea using cols using straight html coding outside of wiki framework, and sizing is set correctly. Viewing source code of wiki created page shows cols=30 is set is being set as part of. Note there is no problem with the rows parameter. Testing browsers included FF2 on Linux & Windows, and IE7 on Windows. Any suggestions what is causing cols to not work inside the wiki framework? Thanks in advance. --Jace
 * Problem solved! /wiki/skins/monobook/main.css has a definition for textarea with width=100%. Now to see what that effects if commented out. -- Jace --70.41.141.252 03:40, 21 September 2007 (UTC)
 * Better Solution: Do not comment out width=100% in main.css. Instead, add "style=width:auto" as a parameter to {{#input --Jace--70.41.141.252 05:09, 21 September 2007 (UTC)

{{#input:type=textarea|cols=30|rows=2|style=width:auto}}

What's new in Version 0.3.11
Hi Nad. Tall us in the Change log, Please :-). Thank you!--Roc michael 01:43, 22 September 2007 (UTC)

More page creation issues
How do I get a form to create a page and then, upon editing that page, call all those form values back into the form for editing (like Semantic Forms does)? —Eek 11:28, 22 September 2007 (UTC)


 * You can use SimpleForms to create a form as an interface to templates within an article as in the Updating template articles with an Ajax form example, and that kind of form-to-template integration will be made easier to implement in the next version, but there are no plans for SimpleForms to hook in to the edit action in the way SemanticForms does. --Nad 11:53, 22 September 2007 (UTC)


 * Is there an easier way without having to duplicate every template value when saving? That seems really tedious--especially since my form will have at least 77 parameters and it's bad enough having to create separate form (input) and template (output) pages... —Eek 21:04, 22 September 2007 (UTC)


 * What do you mean by "duplicate every template value when saving"? if you're referring to the difficult syntax involved in that form-updating example, then yes there will be a much easier way in simple forms 0.4 which is already done but has a bug which I haven't been able to find yet, so should be ready soon. --Nad 21:27, 22 September 2007 (UTC)


 * I'm referring to this line:


 * As you can see, this is only for a mere 3 parameters; imagine how long it would be for 77! :/ Hopefully the "much easier way" can automatically pull in the form's parameters without having to manually specify each one when saving/updating... —Eek 07:40, 23 September 2007 (UTC)
 * Yip, that's what I thought you must have meant, 0.4 will not require any script to be added for each property, it will just be a single form attribute allowing it to post the values into directly into the template. --Nad 07:54, 23 September 2007 (UTC)