Answer the question
In order to leave comments, you need to log in
Zend Framework 1. How to keep entered values after form reload?
There is a form class:
class Application_Form_Sort extends Zend_Form
{
public function init()
{
$this->setMethod('GET');
$this->addElement('select', 'sortby',
array(
'label' => 'Сортировать по',
'multiOptions' =>
array(
'message_id' => 'Номеру',
'title' => 'Заголовку',
'created_at' => 'Дате публикации',
),
)
);
$this->addElement('select', 'orderby', array(
'label' => 'Порядок', 'value' => 'ASC',
'multiOptions' => array('ASC' => 'Прямой', 'DESC' => 'Обратный',),));
$this->addElement('submit', 'sort', array(
'ignore' => true,
'label' => 'Сортировать',
));
}
}
$sort = new Application_Form_Sort();
$this->view->sort = $sort;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question