Answer the question
In order to leave comments, you need to log in
Zend Framework 1: Why doesn't $form->isValid work with $field->->setBelongsTo('art');?
Hello. I make a shape, divided it into several parts (what would be in subarrays) using $field->->setBelongsTo('art');. This is how the code for one field looks in full:
//Заголовок новости
$news_title = new Zend_Form_Element_Text('title');
$news_title->setBelongsTo('news');
$news_title->setRequired(true);
$news_title->setLabel('Тема:');
$news_title->setDecorators(
$this->Decorator('required')
);
$news_title->addFilter(new Zend_Filter_StringTrim());
$news_title->addFilter(new Zend_Filter_StripTags());
$this->addElement($news_title);
if($request->isPost() && $news_form->isValid($request->getParam('news'))){
}
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