[html-formfu] refresh of the form

rahed raherh at gmail.com
Fri Mar 12 18:53:15 GMT 2010


Carl Franks <fireartist at gmail.com> writes:

> I've tested this out with a new Catalyst app, with meta-refresh set to
> 10 seconds, with the following form:
>
> elements:
>   - name: foo
>     label: Foo
>   - type: Submit
>     name: Submit
>
> The Controller is empty, so any submitted form will just be
> redisplayed, including any values the user entered.
> When I first load the page, the form is empty.
> When I type a value into the "foo" field and submit the form, the page
> is redisplayed with the same form, containing the "foo" value I
> entered.
> After 10 seconds, the page auto-refreshes - and at this point I can
> see in the Catalyst Debug output, that no values are sent to the
> server (tested in both firefox + IE).
>
> This particular part of the process has nothing to do with FormFu - it
> seems to be normal browser behaviour to not resubmit a form during a
> meta-refresh.
> So I think the next step needed is to figure out why it did work with
> FormBuilder. JavaScript maybe?
> Check the generated source code, and look at the live Debug output
> during the refreshes.

I may not have been clear. My workaround is I check in the controller if
the form is loaded for the first time or refreshed or submitted. When
first loaded all form fields values are put into session variables.
Consequently during refresh the form is updated in the template with
these variables.
For me this is easier than to study the FormBuilder source code.

Thank you for help.

-- 
Radek



More information about the HTML-FormFu mailing list