Marie Shvartsapel | 15 Mar 06:22
Favicon

HTML::Template + validation = strange behavior?

Hello,

I'm new to the FormBuilder and to this list, so please excuse me if this has
been discussed already.
I am trying to use HTML::Template template + validation functionality of the
FB. I turned off JavaScript and want to use server side validation only.

Let me describe the scenario in short: Form is displayed, submitted (with
blank fields), redisplayed with error messages, submitted again (again with
blank values). Now the fun part: All of my visible form elements get
doubled!

     Am I not using FB or template correctly or this is "a feature" of FB?

Ok, a little clarification - it seems to be happening when I leave the field
blank without trying to fill it in, just submit it again , whereas this
problem does not seem to occur when some other not-empty invalid value was
provided and left unchanged...
I agree that this is not very typical usage, but hey, you can overlook one
of the values if you are working with a long form.
I have created very simple test script to make sure nothing else gets in the
way.

You can test it for yourself here:
http://maries.thecsl.org/cgi-bin/clearinghouse/test.pl (see code below)

Another detail - I'm using "keepextras"set to 1. Not sure if this might be
related.

A little bonus question: Is my understanding correct that I have to
(Continue reading)

Marie Shvartsapel | 15 Mar 17:18
Favicon

Re: HTML::Template + validation = strange behavior?; Custom messages?

Update:
    setting "keepextras" to 0 seems to fix it. But I need to use 
keepextras because I'm using it for keeping "mode" parameter...(as 
recommended in *Advanced Tutorial - Step 9: Multi-Screen Apps 3 @ 
FormBuilder.org)
*   
One more question:
       I'm trying to change default messages, specifically the tag  that 
wraps around error messages.  I'm passing  the hash to the FB's new() 
method, as shown in the docs:
            messages => {
                form_invalid_opentag => '<span style="color: red">',
                form_invalid_closetag => '</span>'
            },
It does not have any effect for me.
Can anyone spot my mistake?

Thanks for your help,
Marie

Marie Shvartsapel wrote:

>Hello,
>
>I'm new to the FormBuilder and to this list, so please excuse me if this has
>been discussed already.
>I am trying to use HTML::Template template + validation functionality of the
>FB. I turned off JavaScript and want to use server side validation only.
>
>Let me describe the scenario in short: Form is displayed, submitted (with
(Continue reading)


Gmane