Tags:
create new tag
, view all tags

FormPluginDev Discussion: Page for developer collaboration, enhancement requests, patches and improved versions on FormPlugin contributed by the TWikiCommunity.
• Please let us know what you think of this extension.
• For support, check the existing questions, or ask a new support question in the Support web!
• Please report bugs below

Feedback on FormPlugin

We already have 2 form plugins: HtmlFormsPlugin and ControlsPlugin. Why create yet another one? Both plugins allow to create form elements (in slightly different ways), but neither plugin lets me create a complete form. And I found form validation (plus feedback) lacking.

FormPlugin is work in progress and should incorporate more traits from these plugins, for example to load form data from another topic.

-- ArthurClemens - 13 May 2007

older comments removed (see revision 21)

-- ArthurClemens - 08 Mar 2008

Using this promising plugin breaks the CSS in that when I try and view even a simple form my navigation menu switches over to the right-hand side. Viewing the FormPluginExamples topic also shows that the CSS is broken because the example forms become centered and the font changes. I get this with both IE7.5730 and FF2.0.0.14.

I'm running TWiki version TWiki-4.2.0, Tue, 22 Jan 2008, build 16278, Plugin API version 1.2.

This means I cannot use this plugin as it looks messy.

-- JamesGMoore - 18 Jun 2008

Do you a different skin than PatternSkin?

-- ArthurClemens - 18 Jun 2008

Nope I use the default skin which is PatternSkin.

-- JamesGMoore - 19 Jun 2008

I've put more info on my user info, just click my name and read the TWiki Usage section.

-- JamesGMoore - 19 Jun 2008

I don't see any problems on IE 7 nor Firefox (2.0.0.16).

-- ArthurClemens - 27 Jul 2008

Hi Arthur, after the installation I got an

Undefined subroutine &TWiki::Func::isTrue called at /home/twiki/lib/TWiki/Plugins/FormPlugin.pm line 631.

does this mean that the TWiki version I'm running is not up to par ?

-- KeithHelfrich - 24 Sep 2008

I see there is a mistake in the code. Instead of calling TWiki::Func::isTrue it should call the internal function isTrue. Tracked in Bugs:Item6017.

-- ArthurClemens - 24 Sep 2008

I had problems using this plugin with mod_perl. My solution is to init the global variables in the initPlugin() function:

At Line 122 insert:

   #init global variabes (problems with mod_perl)
   $headerDone               = 0;
   $defaultTitleFormat       = ' $t <br />';
   $defaultFormat            = '<p>$titleformat $e $m $h </p>';
   $defaultHiddenFieldFormat = '$e';
   %expandedForms            = ();
   %validatedForms           = ();
   %errorForms               = ();
   %noErrorForms             = ();
   %uncheckedForms           = ();
   %substitutedForms         = ()
     ; # hash of forms names that have their field tokens substituted by the corresponding field values
   %errorFields = ();    # for each field entry: ...

-- ManfredMeiser - 2009-10-08

I'm finding that with validation, radio form fields which were filled in are not being forwarded. In other words, say you left out any mandatory fields, when the form is re-displayed, any radio entries are set back to their default values. I'm going to look at the code and see if I can spot anything. Any ideas?

-- AaronLWalker - 2011-01-06

I find the problem with checkboxes, too. Perhaps it is because the plugin the id fields for these elements are changed to <name>_<value> ?

-- AaronLWalker - 2011-01-06

A nice-to-have would be an id token for the form fields. I know some get generated for radio buttons and checkboxes, but having them for all fields would make some javascript processing much easier.

-- AaronLWalker - 2011-01-07

Yes, and the ID could match the name cleaned-up of the form field (removing spaces, dashes etc)

-- PeterThoeny - 2011-01-07

We have a serious issue with the plugin when using mandatory fields. After leaving a mandatory field blank the error message appears just as it should. But filling the field will not remove the message and the field content is lost so the user cannot correct the error - he has to leave the topic and call it again to start over.

I tried to debug and found out that the url parameters get doubled in the action url when sending the form after correcting the missing field. (You can see that in the html code of the rendered page and in the debug information).

But I cannot figure out why this happens.

-- MichaelGulitz - 2012-06-29

I set the action of the form to save but where does it save the form fields? I have created a form and when I hit the submit button I'd like the fields saved in a file with the fields on a line, comma separated. That is in a sqlite db. I don't see how to do this with the plugin.

-- SteveBrailsford - 2012-07-29

how to include several forms in email body? for example I have dropdown field, date field and textarea field and I need to send them all in email body.

-- Pavel Patcheptsov - 2013-02-14

This is the wrong forum / plugin. And please don't cross-post to HowToEmailAForm and here.

-- Peter Thoeny - 2013-02-14

How to save selection with type="checkbox"?

For example four Values in one Element, any user can check/uncheck box and this state should be saved until someone else won't change this checkbox again:

%STARTFORM{ name="name" action="view" }%
%FORMELEMENT{ name="n1" type="checkbox" title="Monday" fieldformat="$e" options="1, 2, 3, 4" }%
%FORMELEMENT{ name="n2" type="checkbox" title="Tuesday" fieldformat="$e" options="1, 2, 3, 4" }%
%ENDFORM%

-- Pavel Patcheptsov - 2013-05-15

I noticed an issue when using a "date" field with a custom skin: the datepicker doesn't appear. For some reason the datepicker icon is set to "display:none" via CSS (class twikiMakeVisible). Had to manually change it to "display:inline". Just wondering if anybody knows the reason and if this is a symptom that something is not being used the right way (skin definition, plugin using, ....). Thanks

-- Thomas Fozzi - 2015-02-25

This was a bug, now fixed - new plugin version available. The bug is an artifact of switching from JSCalendarContrib to DatePickerPlugin.

-- Peter Thoeny - 2015-02-25

I confirm it works now, thanks!

-- Thomas Fozzi - 2015-03-04

I'm getting an "Invalid crypt token" error when I submit the form after a validation error... Is anybody experiencing the same issue?

I see that the crypt_token parameter is regularly generated and passed if I correctly fill the form on the first attempt. But I make something wrong, get the validation error, correct the error and then submit, no crypt_token parameter is passed...

I'm using POST method.

Thanks

-- Thomas Fozzi - 2016-12-21

Edit | Attach | Watch | Print version | History: r44 < r43 < r42 < r41 < r40 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r44 - 2016-12-21 - ThomasFozzi
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.