| 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 Airline
*
* @name Airport
* @author Shailender Joshi
* @created 30 Sep 2016
* @updated 30 Sep 2016
*/
class Travel_Form_Airport 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 airport title'))
->removeDecorator('label')
->removeDecorator('HtmlTag')
->removeDecorator('DtDdWrapper');
/************ Code *****************/
$Code = $this->createElement('text','Code',
array(
'value' => trim($params['Code']),
'class' => 'form-control',
'required'=>true,
'filters' => array('StringTrim'),
'maxlength' => 10,
//'validators' => array(array('StringLength', false, array(3, 100))),
))
->setErrorMessages(array('Please enter airport code'))
->removeDecorator('label')
->removeDecorator('HtmlTag')
->removeDecorator('DtDdWrapper');
/************ Country List *****************/
// get country list array
$objCountry = new Travel_Model_TblCountry();
$allmenues = $objCountry->getCountryList();
$dataMenu = array();
$dataMenu[""]="--Select--";
$countryList = $this->createElement('select', 'countryList');
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', 'getCityAjax(this.value)');
$countryList->class = "demo-default select-country";
/************ Latitude *****************/
$Latitude = $this->createElement('text','Latitude',
array(
'value' => trim($params['Latitude']),
'class' => 'form-control',
'required'=>false,
'filters' => array('StringTrim'),
'maxlength' => 20,
//'validators' => array(array('StringLength', false, array(3, 100))),
))
->setErrorMessages(array('Please enter latitude'))
->removeDecorator('label')
->removeDecorator('HtmlTag')
->removeDecorator('DtDdWrapper');
/************ Longitude *****************/
$Longitude = $this->createElement('text','Longitude',
array(
'value' => trim($params['Longitude']),
'class' => 'form-control',
'required'=>false,
'filters' => array('StringTrim'),
'maxlength' => 20,
//'validators' => array(array('StringLength', false, array(3, 100))),
))
->setErrorMessages(array('Please enter longitude'))
->removeDecorator('label')
->removeDecorator('HtmlTag')
->removeDecorator('DtDdWrapper');
$this->addElements(array(
$Title,
$Code,
$countryList,
$Latitude,
$Longitude,
));
}
}