| Server IP : 103.234.187.230 / Your IP : 216.73.216.216 Web Server : Apache System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/b2bzend/application/forms/ |
Upload File : |
<?php
/*
* Form Currency
*
* @name Currency
* @author Shailender Joshi
* @created 6 Oct 2016
* @updated 6 Oct 2016
*/
class Travel_Form_Currency extends Zend_Form {
public function __construct($params = null) {
/************ Title *****************/
$Title = $this->createElement('text','Title',
array(
'value' => trim($params['Title']),
'class' => 'form-control',
'required'=>true,
'filters' => array('StringTrim'),
'maxlength' => 100,
//'validators' => array(array('StringLength', false, array(3, 100))),
))
->setErrorMessages(array('Please enter Title'))
->removeDecorator('label')
->removeDecorator('HtmlTag')
->removeDecorator('DtDdWrapper');
/************ Symbol *****************/
$Symbol = $this->createElement('text','Symbol',
array(
'value' => trim($params['Symbol']),
'class' => 'form-control',
'required'=>true,
'filters' => array('StringTrim'),
'maxlength' => 10,
//'validators' => array(array('StringLength', false, array(3, 100))),
))
->setErrorMessages(array('Please enter Symbol'))
->removeDecorator('label')
->removeDecorator('HtmlTag')
->removeDecorator('DtDdWrapper');
/************ image file *****************/
$Logo = $this->createElement('file','Logo',
array(
'required'=> false,
'MaxFileSize' => 2097152, // for 2 MB
'autocomplete'=> 'off',
'class' => '',
'id' => 'Logo',
'validators' => array( array('Count', false, 1), array('Size', false, 2097152), array('Extension', false, 'gif,jpg,jpeg,png'),
)
))
->setErrorMessages(array('Please choose Image'))
->removeDecorator('label')
->removeDecorator('HtmlTag')
->removeDecorator('DtDdWrapper');
/************ Multiple Select Country List *****************/
$objCountry = new Travel_Model_TblCountry();
$allmenues = $objCountry->getCountryList();
$dataMenu = array();
$dataMenu[""]="--Select--";
$countryList = $this->createElement('multiselect', 'countryList[]'); // createElement('multiselect', 'countryList[]'); for multiple selection in combobox
foreach ($allmenues as $data) {
$dataMenu[$data['ContId']] = $data['Title'];
}
$countryList->setRequired(true);
$countryList->setMultiOptions($dataMenu);
$countryList->setErrorMessages(array('Please select Country'));
$countryList->removeDecorator('label');
$countryList->removeDecorator('HtmlTag');
//$countryList->setAttrib('onchange', 'getSubMenu(this.value)');
$countryList->setAttrib('multiple',true); // Allow multiple true in case of multiselect
$countryList->class = "demo-default select-state";
$this->addElements(array(
$Title,
$Symbol,
$Logo,
$countryList,
));
}
}