我想用 Zend 发布数组。
html表单:
<form id="form" class="form-container" action="<?php echo $this->form->getAction(); ?>" method="post" enctype="multipart/form-data">
<?php foreach ($this->projects as $item): ?>
<?php echo $this->form->time_on_project; ?>
<?php echo $this->form->comment; ?>
<?php endforeach; ?>
Zend 形式:
$this->addElement('text', 'time_on_project[]', array(
'label' => 'Время(формат час:минуты):',
'required' => true,
'attribs' => array('class' => 'form-field', 'required' => 'required', 'placeholder' => 'Введите время в формате час:минуты'))
);
$this->addElement('textarea', 'comment[]', array(
'label' => 'Что сделано:',
'required' => false,
'attribs' => array('class' => 'form-field', 'style' => 'height: 100px')
));
之后,我的输入没有显示。如何使它正确?感谢帮助。