[pmwiki-users] how to re-show form with pre-existing field data?
The Editor
editor at fast.st
Mon May 21 10:55:02 CDT 2007
On 5/21/07, Hans <design5 at softflow.co.uk> wrote:
> Monday, May 21, 2007, 4:43:39 PM, Shi Sherebrin wrote:
>
> > There are some required fields, and when they are left blank, the form is
> > re-displayed with a "data missing" message. However, when this happens all the
> > other forms that *were* filled out come back blank. Apparently this is
> > something that should be solvable at the PmWiki level. I'd welcome ideas for
> > how to do this.
>
> try in a local config file:
>
> # POST input values will be preserved
> foreach ($_POST as $k=>$v) {
> if(!is_array($v))
> $InputValues[$k] = htmlspecialchars($v);
> }
>
> also use a late beta pmwiki version, as the input textarea now
> supports $InputValues
>
>
> ~Hans
Thanks again Hans, you mentioned that to me once before and I didn't
tinker much with it at the time. Just now added it to the ZAP code and
it works beautifully. Will keep in the next release as it is so
useful...
I don't suppose there are any situations you wouldn't want these lines
active? Such as perhaps if you go from one form to another, and they
both have a similar field name... Probably not worth worrying about...
Cheers,
Dan
More information about the pmwiki-users
mailing list