public function init() { $this->setAttribs(array('id' => 'filter_form', 'class' => 'global_form_box'))->setAction(Zend_Controller_Front::getInstance()->getRouter()->assemble(array())); parent::init(); $this->addElement('Text', 'search', array('label' => 'Search Music:')); $this->addElement('Select', 'sort', array('label' => 'Browse By:', 'multiOptions' => array('recent' => 'Most Recent', 'popular' => 'Most Popular'))); }
public function init() { $this->setAttribs(array('id' => 'filter_form', 'class' => 'global_form_box'))->setMethod('GET')->setAction(Zend_Controller_Front::getInstance()->getRouter()->assemble(array('page' => null))); parent::init(); $this->addElement('Text', 'search', array('label' => 'Search Polls:')); $this->addElement('Select', 'show', array('label' => 'Show', 'multiOptions' => array('1' => 'Everyone\'s Polls', '2' => 'Only My Friends\' Polls'), 'onchange' => 'searchPolls();')); $this->addElement('Select', 'closed', array('label' => 'Status', 'onchange' => 'searchPolls();', 'multiOptions' => array('' => 'All Polls', '0' => 'Only Open Polls', '1' => 'Only Closed Polls'))); $this->addElement('Select', 'order', array('label' => 'Browse By:', 'onchange' => 'searchPolls();', 'multiOptions' => array('recent' => 'Most Recent', 'popular' => 'Most Popular'))); }
public function init() { $this->setAttribs(array('id' => 'filter_form', 'class' => 'global_form_box'))->setAction(Zend_Controller_Front::getInstance()->getRouter()->assemble(array()))->setMethod('GET'); parent::init(); $this->addElement('Text', 'search', array('label' => 'Search Music:')); $this->addElement('Select', 'show', array('label' => 'Show', 'multiOptions' => array('1' => 'Everyone\'s Playlists', '2' => 'Only My Friends\' Playlists'))); $this->addElement('Select', 'sort', array('label' => 'Browse By:', 'multiOptions' => array('recent' => 'Most Recent', 'popular' => 'Most Popular'))); $this->addElement('Hidden', 'user'); $this->addElement('Hidden', 'page', array('order' => 100)); $this->addElement('Button', 'search_bt', array('label' => 'Search', 'type' => 'submit', 'order' => 101)); }
public function init() { $this->setAttribs(array('id' => 'filter_form', 'class' => 'global_form_box'))->setAction(Zend_Controller_Front::getInstance()->getRouter()->assemble(array())); parent::init(); $this->addElement('Text', 'search', array('label' => 'Search Albums:')); $this->addElement('Select', 'sort', array('label' => 'Browse By:', 'multiOptions' => array('recent' => 'Most Recent', 'popular' => 'Most Popular'))); // prepare categories $categories = Engine_Api::_()->getDbtable('categories', 'album')->getCategoriesAssoc(); if (count($categories) > 0) { $this->addElement('Select', 'category_id', array('label' => 'Category', 'multiOptions' => $categories)); } }
public function init() { $this->setAttribs(array('id' => 'filter_form', 'class' => 'global_form_box')); parent::init(); $this->addElement('Text', 'search', array('label' => 'Search Albums:')); $this->addElement('Select', 'sort', array('label' => 'Browse By:', 'multiOptions' => array('recent' => 'Most Recent', 'popular' => 'Most Popular'))); // prepare categories $categories = Engine_Api::_()->getDbtable('categories', 'album')->getCategoriesAssoc(); if (count($categories) > 0) { $this->addElement('Select', 'category_id', array('label' => 'Category', 'multiOptions' => $categories)); } $this->addElement('Button', 'submit_btn', array('label' => 'Search', 'type' => 'submit', 'ignore' => true)); }
public function init() { $this->setAttribs(array('id' => 'filter_form', 'class' => 'global_form_box'))->setAction(Zend_Controller_Front::getInstance()->getRouter()->assemble(array())); parent::init(); $this->addElement('Text', 'search', array('label' => 'Search Albums:')); $this->addElement('Select', 'sort', array('label' => 'Browse By:', 'multiOptions' => array('recent' => 'Most Recent', 'popular' => 'Most Popular'))); // prepare categories $categories = Engine_Api::_()->album()->getCategories(); if (count($categories) != 0) { $categories_prepared[0] = ""; foreach ($categories as $category) { $categories_prepared[$category->category_id] = $category->category_name; } // category field $this->addElement('Select', 'category_id', array('label' => 'Category', 'multiOptions' => $categories_prepared)); } }
public function init() { $this->setAttribs(array('id' => 'login_contactimporter_form', 'class' => 'global_form'))->setAction(Zend_Controller_Front::getInstance()->getRouter()->assemble(array())); parent::init(); $request = Zend_Controller_Front::getInstance()->getRequest(); $type = $request->getParam('type'); $provider = $request->getParam('provider'); $label = "Email"; if ($type == 'user') { $label = "Username"; } $this->addElement('Text', 'email', array('label' => $label, 'required' => true)); $this->addElement('Password', 'password', array('label' => 'Password', 'required' => true)); $this->addElement('Hidden', 'provider', array('value' => $provider)); $this->addElement('Button', 'submit', array('label' => 'Import Contacts', 'type' => 'submit', 'link' => true, 'ignore' => true, 'decorators' => array('ViewHelper'))); $this->addElement('Button', 'cancel', array('label' => 'Cancel', 'link' => true, 'href' => '', 'onclick' => 'parent.Smoothbox.close();', 'decorators' => array('ViewHelper'))); // DisplayGroup: buttons $this->addDisplayGroup(array('submit', 'cancel'), 'buttons', array('decorators' => array('FormElements', 'DivDivDivWrapper'))); }