tuga
(Tuga74)
1
Hi all,
I’m using Form Builder to make a form but I cannot set the attribute name, everything works except name.
My configuration for the form is:
return array (
'elements' => array (
'hotelCheckin' => array (
'id' => 'hotelCheckin',
'name' => 'hotelCheckin',
'type' => 'text',
'label' => 'Check In',
'maxlength' => 32 ) ),
'buttons' => array () );
but the name doesn’t apply, I am doing something wrong??
Thanks for your help
tuga
(Tuga74)
2
SOLUTION
As specified by CFormInputElement it should be set on attributes
return array (
'elements' => array (
'hotelCheckin' => array (
'id' => 'hotelCheckin',
'type' => 'text',
'label' => 'Check In',
'maxlength' => 32,
'attributes'=>array('name'=>'hotelCheckin'))
) ),
'buttons' => array () );