![Picture of Sebastian Wais Picture of Sebastian Wais](/picture/user/236170.gif)
Sebastian Wais - 2006-09-27 13:18:50
Hi Manuel
I was wandering if is posible to make easier to use this class by fgivin a string and assuming the more common options.
For Example
AddInput('any_input')
Could be parsed as the same as
AddInput(array(
'name' => 'any_input',
'id' => 'any_input',
'type' => 'text',
'label' => 'Any Input'
))
just assuming the strings as text, using the string for id and name and replacing "_" for " ", and ucwords for presentation...
Maybe, if its posible, if this input "WasSubmitted" also getting the value.
And maybe also assume it is a mandatory field.
I think this is the most common input in any form, so it would be much easier and faster.
Also I had the same idea for AddLabelPart, 'cause I usually use
AddLabelPart(array("FOR" => "field_name"))
It could be
AddLabelPart("field_name")
Thanks