[pmwiki-users] Fox input validation and default value

Hans design5 at softflow.co.uk
Tue Mar 11 17:11:09 CDT 2008

Tuesday, March 11, 2008, 8:33:35 PM, Randy wrote:

> I'm using fox form's input validation and also supplying a default  
> value for the input box. If the user changes the value to an invalid  
> value, then the error message appears. But so does the default value,
> wiping out what the user entered. This prevents the user from simply  
> correcting a typo.

> Is there a way around this?

Yes. Do not set a default in an input field using it's value= option,
or using (:input 'type' 'name' 'value':) syntax, leave the value out
of the input control, and set  a default by using markup
(:input default 'name' 'value':)

This will set an initial default value, but when a submission gets
aborted the last entered value will show.


More information about the pmwiki-users mailing list