Hi all,

i'm fighting with Zend_Form_Element factory and can't fix the following problem (ZF 1.8.4 patch 1):

        $fields = array(
        'id_ue'   => array(
                            'type'    => 'text',
                            'name'    => 'id_ue',
                            'options' => array('label' => 'code UE',
                                               'size' => 6,
                                               'required' => true,
                                               'value' => 'test')),
        'id_session'    => array(
                            'type'    => 'hidden',
                            'name'    => 'id_session',
                            'options' => array('value' => 'test'))
        );

        $form = new Zend_Form();
        $form->addElements($fields);

When rendering the form, all seems right but values are not set in input tags :

<input type="text" size="6" value="" id="id_ue" name="id_ue"/>
<input type="hidden" id="id_session" value="" name="id_session"/>

I have tried a lot of things (setting value outside of 'options', using 'attrib' in options but don't the syntax...).
I did not find any examples of this use case.

Thanks for help.

Denis.

Reply via email to