PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » HTML » HTML_QuickForm » Bug #1227

HTML_QuickForm_button() creates only one of two possible button types

Details

Submitted2004-04-16 21:24 UTC
Fromtipsen at imada dot sdu dot dk
Assignedavb
StatusClosed
PackageHTML_QuickForm
PHP VersionIrrelevant
OSIrrelevant
Roadmaps(Not assigned)

Comments

[2004-04-16 21:24 UTC] tipsen at imada dot sdu dot dk

Description:
------------
In HTML there are two kinds of buttons:

<input name="fieldname" type="button" value="value">

and

<button name="fieldname" type="button" value="submittedvalue">displayedvalue</button>

HTML_QuickForm::addElement('button', 'fieldname', 'value') generates the first kind of button element. Unfortunately there is no way to generate the second type of button element which is quite handy since it allows a value to be submitted with the form as well as an image to function as a button!

See more here:
http://www.w3.org/TR/html4/interact/forms.html#h-17.5
http://www.w3.org/TR/html4/interact/forms.html#input-control-types

For now I have faked the button element with an ordinary input element with type=button as well as a hidden field containing the value for submission and a javascript containing the stuff - very messy :-)

I dont have any ideas on how to implement the button element since the "advanced/real" button element offers three different types being submit, reset and button - perhaps a completely new constructor/subclass?

Please feel free to write me if the above explanation is not enough!