[html-formfu] Submit button with a value and no name
Carl Franks
fireartist at gmail.com
Fri Jun 8 09:40:19 GMT 2007
On 08/06/07, Brian Cassidy <brian.cassidy at nald.ca> wrote:
> Hey Gang,
>
> I must be doing something incorrect, but here's what I'm trying to
> accomplish:
>
> Typically i make submit buttons like this:
>
> <input type="submit" value="Search" />
>
> in the YAML config that gets translated to
>
> - type: submit
> value: Search
>
> However, if something is incorrect in the rest of the form, when it gets
> regenerated i get a blank submit button. Adding a name to the config
> makes it work, but it'd prefer to omit that key-value pair from the form
> data if i could.
- type: submit
default: Search
retain_default: 1
note that although 'value' will give the same result in this case,
it's probably best to get into the habit of using 'default', because
it does behave differently for some elements.
Carl
More information about the HTML-FormFu
mailing list