Zend Forms - populate() and setDefaults()

后端 未结 4 1829
盖世英雄少女心
盖世英雄少女心 2021-02-15 11:33

Let\'s say I have a form that collects a first name and a last name:

$first_name = new Zend_Form_Element_Text(\'first_name\');
$first_name->setLabel(\"First N         


        
4条回答
  •  日久生厌
    2021-02-15 11:53

    Array keys are the field names, array values are the field values.

    $data = array( 'first_name' => 'Mickey', 'last_name' => 'Mouse' );
    

提交回复
热议问题