Button.formwidget

A <button class="formwidget" returns data when it's checked. Only <button type="radio" and <button type="checkbox" can be checked interactively, but a plain button can be checked with an attribute. Firefox/Mac doesn't show the difference :-| When harvesting, if a button has no value, it's label is used as value.

When seeding, the button is checked if the name/value matches. If the button previously had no label, it is set to the given label, otherwise it is ignored.

see menuitems for <button type="menu" and <button type="menu-button". toolbarbuttons are not implemented yet.

Note: when seeding, checkbox buttons are never unchecked. Such is the nature of a checkbox: if it is not checked, it doesn't mean it should be unchecked; it means nothing. If you need a switch, use radiobutton buttons.

Example:

<button name="mybut" value="1" class="formwidget" label="one" /> result:
mybut=1

Additional Attributes:


Additional Methods: