本文整理汇总了PHP中Zend_Form_Element_Textarea::setAttribs方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Form_Element_Textarea::setAttribs方法的具体用法?PHP Zend_Form_Element_Textarea::setAttribs怎么用?PHP Zend_Form_Element_Textarea::setAttribs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Form_Element_Textarea
的用法示例。
在下文中一共展示了Zend_Form_Element_Textarea::setAttribs方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($options = null)
{
parent::__construct($options);
$resendemail = new Zend_Form_Element_Text('resendemail');
$resendemail->setLabel($this->getView()->translate('To'))->addFilter('StripTags')->addFilter('StringTrim')->addValidator('EmailAddress');
$max_amount = isset($options['max_amount']) ? $options['max_amount'] : 50;
for ($i = 1; $i <= $max_amount; $i++) {
$varName = 'email' . $i;
${$varName} = new Zend_Form_Element_Text('email' . $i);
${$varName}->addFilter('StripTags')->addFilter('StringTrim')->addValidator('EmailAddress');
if ($i == $max_amount) {
${$varName}->setAttrib("style", "width:75%");
}
}
$subject = new Zend_Form_Element_Text('subject');
$subject->setAttribs(array("disabled" => 'disabled'))->addFilter('StringTrim');
$subject->setAttrib("style", "width:75%");
$message = new Zend_Form_Element_Textarea('message');
$message->setAttribs(array('rows' => 5, 'cols' => 100))->addFilter('StripTags')->addFilter('StringTrim')->addValidators(array(array('StringLength', false, array(0, 500))));
$message->setAttrib("style", "width:75%");
$sentMailAmount = new Zend_Form_Element_Hidden('sentMailAmount');
$submit = new Zend_Form_Element_Submit('submit');
$submit->setLabel($this->getView()->translate('INVITATION_MAIL_SEND'));
$this->addElements(array($resendemail, $sentMailAmount, $subject, $message, $submit));
for ($i = 1; $i <= $max_amount; $i++) {
$varName = 'email' . $i;
$this->addElement(${$varName});
}
}
示例2: init
public function init()
{
// contato_nome
$contato_nome = new Zend_Form_Element_Text("contato_nome");
$contato_nome->setLabel("Nome");
$contato_nome->setRequired();
$contato_nome->setAttribs(array('class' => 'form-control'));
$contato_nome->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
// contato_email
$contato_email = new Zend_Form_Element_Text("contato_email");
$contato_email->setLabel("E-mail");
$contato_email->setRequired();
$contato_email->setAttribs(array('class' => 'form-control'));
$contato_email->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
// contato_assunto
$contato_assunto = new Zend_Form_Element_Select("contato_assunto");
$contato_assunto->setLabel("Assunto");
$contato_assunto->setRequired();
$contato_assunto->setAttribs(array('class' => 'form-control'));
$contato_assunto->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
$contato_assunto->setMultiOptions(array("" => "Selecione o assunto...", "Informação" => "Informação", "Elogio" => "Eologio", "Crítica" => "Crítica", "Sugestão" => "Sugestão", "Outros" => "Outros"));
// contato_mensagem
$contato_mensagem = new Zend_Form_Element_Textarea("contato_mensagem");
$contato_mensagem->setLabel("mensagem");
$contato_mensagem->setRequired();
$contato_mensagem->setAttribs(array('class' => 'form-control', 'rows' => 5));
$contato_mensagem->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
$this->addElements(array($contato_nome, $contato_email, $contato_assunto, $contato_mensagem));
parent::init();
}
示例3: init
public function init()
{
// profissional_beleza_id
$profissional_beleza_id = new Zend_Form_Element_Radio("profissional_beleza_id");
$profissional_beleza_id->setLabel("Selecione o profissional desejado: ");
$profissional_beleza_id->setRegisterInArrayValidator(false);
$profissional_beleza_id->setRequired();
$profissional_beleza_id->setDecorators(App_Forms_Decorators::$checkboxElementDecorators);
// agenda_data
$agenda_data = new Zend_Form_Element_Text("agenda_data");
$agenda_data->setLabel("Selecione a data: ");
$agenda_data->setAttribs(array('class' => 'form-control', 'autocomplete' => 'off'));
$agenda_data->setRequired();
$agenda_data->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
// agenda_hora
$agenda_hora = new Zend_Form_Element_Select("agenda_hora");
$agenda_hora->setLabel('Selecione a hora: ');
$agenda_hora->setAttribs(array('class' => 'form-control'));
$agenda_hora->setMultiOptions(array('' => 'Horários'));
$agenda_hora->setRequired();
$agenda_hora->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
$agenda_hora->setRegisterInArrayValidator(false);
// agenda_observacao
$agenda_observacao = new Zend_Form_Element_Textarea("agenda_observacao");
$agenda_observacao->setLabel("Observações: ");
$agenda_observacao->setAttribs(array('class' => 'form-control', 'rows' => 7, 'placeholder' => 'Informe alguma observação, por exemplo, alguma preferência de produto, etc.'));
// salao_id
$salao_id = new Zend_Form_Element_Hidden('salao_id');
// especialidade_id
$especialidade_id = new Zend_Form_Element_Hidden("especialidade_id");
// usuario_id
$usuario_id = new Zend_Form_Element_Hidden("usuario_id");
$this->addElements(array($profissional_beleza_id, $agenda_data, $agenda_hora, $agenda_observacao, $salao_id, $especialidade_id, $usuario_id));
parent::init();
}
示例4: init
public function init()
{
/**
* projeto_id
*/
$modelProjeto = new Model_DbTable_Projeto();
$projeto_id = new Zend_Form_Element_Select("projeto_id");
$projeto_id->setLabel("Projeto: ");
$projeto_id->setAttribs(array('class' => 'form-control'));
$projeto_id->setMultiOptions($modelProjeto->fetchPairs());
$this->addElement($projeto_id);
/**
* tarefa_nome
*/
$tarefa_nome = new Zend_Form_Element_Text("tarefa_nome");
$tarefa_nome->setLabel("Título: ");
$tarefa_nome->setAttribs(array('class' => 'form-control'));
$tarefa_nome->setRequired();
$this->addElement($tarefa_nome);
/**
* tarefa_descricao
*/
$tarefa_descricao = new Zend_Form_Element_Textarea("tarefa_descricao");
$tarefa_descricao->setLabel("Descrição: ");
$tarefa_descricao->setAttribs(array('class' => 'form-control', 'rows' => 10));
$tarefa_descricao->setRequired();
$this->addElement($tarefa_descricao);
parent::init();
}
示例5: FrmPicturColor
public function FrmPicturColor($data = null)
{
$color_discription = new Zend_Form_Element_Text('color_discription');
$color_discription->setAttribs(array('class' => 'form-control'));
$item_size = new Zend_Form_Element_Text('item_size');
$item_size->setAttribs(array('class' => 'form-control'));
$item_weight = new Zend_Form_Element_Text('item_weight');
$item_weight->setAttribs(array('class' => 'form-control'));
$item_volume = new Zend_Form_Element_Text('item_volume');
$item_volume->setAttribs(array('class' => 'form-control'));
$itme_width = new Zend_Form_Element_Text('itme_width');
$itme_width->setAttribs(array('class' => 'form-control'));
$itme_height = new Zend_Form_Element_Text('itme_height');
$itme_height->setAttribs(array('class' => 'form-control'));
$itme_length = new Zend_Form_Element_Text('itme_length');
$itme_length->setAttribs(array('class' => 'form-control'));
$item_color = new Zend_Form_Element_Text('item_color');
$item_color->setAttribs(array('class' => 'form-control color-picker-rgba'));
$font_color = new Zend_Form_Element_Text('font_color');
$font_color->setAttribs(array('class' => 'form-control', 'id' => "selected-color1"));
$dual_image = new Zend_Form_Element_Textarea('dual_image');
$dual_image->setAttribs(array('class' => 'form-control'));
$this->addElements(array($color_discription, $item_size, $item_weight, $item_volume, $itme_width, $itme_height, $itme_length, $item_color, $dual_image));
return $this;
}
示例6: __construct
public function __construct($options = null)
{
parent::__construct($options);
$emailCategoryOptionList = array('Invite non-sparks to join campaign' => $this->getView()->translate('Admin_Non-Sparks_Invitation'), 'Invite sparks to join campaign' => $this->getView()->translate('Admin_Sparks_Invitation'), 'Send mail to sparks' => $this->getView()->translate('Admin_Send_Mail_To_Sparks'));
$emailCategory = new Zend_Form_Element_Select('emailCategory');
$emailCategory->setMultiOptions($emailCategoryOptionList);
$emailList = new Zend_Form_Element_Textarea('emailList');
$emailList->setAttribs(array('rows' => 5, 'cols' => 150, 'onChange' => 'datetable()'))->addFilter('StripTags')->addFilter('StringTrim')->addValidators(array(array('StringLength', false, array(0, 65535))));
$subject = new Zend_Form_Element_Text('subject');
$subject->setAttribs(array('size' => 150))->addFilter('StringTrim');
$message = new Zend_Form_Element_Textarea('message');
$message->setAttribs(array('rows' => 30, 'cols' => 150))->addFilter('StripTags')->addFilter('StringTrim')->addValidators(array(array('StringLength', false, array(0, 65535))));
$optionList = array();
$campaign = new Campaign();
$campaigns = $campaign->fetchAll(null, "id desc", null, null);
foreach ($campaigns as $campaign) {
$optionList[$campaign->id] = $campaign->name;
}
$optionList['0'] = $this->getView()->translate('ADMIN_NOT_AUTO_INVITATION');
$campaignId = new Zend_Form_Element_Select('campaignId');
$campaignId->setMultiOptions($optionList);
$code_source = new Zend_Form_Element_Text('code_source');
$code_source->addFilter('StringTrim');
$submit = new Zend_Form_Element_Submit('submit');
$submit->setLabel($this->getView()->translate('INVITATION_MAIL_SEND'));
$this->addElements(array($emailCategory, $emailList, $subject, $message, $campaignId, $code_source, $submit));
}
示例7: FrmProCate
public function FrmProCate($frm = null)
{
$vendor_name = new Zend_Form_Element_Text("vendor_name");
$vendor_name->setAttribs(array('class' => 'validate[required]', 'placeholder' => 'ឈ្មោះអ្នផ្ឌត់ផ្ឌង់'));
$phone = new Zend_Form_Element_Text("phone");
$phone->setAttribs(array('class' => 'validate[required]', 'placeholder' => ''));
$contact = new Zend_Form_Element_Text("contact");
$contact->setAttribs(array('class' => 'validate[required]', 'placeholder' => ''));
$email = new Zend_Form_Element_Text("email");
$email->setAttribs(array('class' => 'validate[required]', 'placeholder' => ''));
$address = new Zend_Form_Element_Textarea("address");
$address->setAttribs(array('class' => '', 'placeholder' => ''));
$status = new Zend_Form_Element_Select('status');
$_arr_status = array(1 => $this->tr->translate("ACTIVE"), 0 => $this->tr->translate("DACTIVE"));
$status->setMultiOptions($_arr_status);
$status->setAttribs(array('class' => 'form-control validate[required]'));
$this->addElements(array($vendor_name, $phone, $contact, $email, $address, $status));
if ($frm != "") {
$vendor_name->setValue($frm["v_name"]);
$phone->setValue($frm["phone"]);
$contact->setValue($frm["contact_name"]);
$email->setValue($frm["email"]);
$address->setValue($frm["vendor_remark"]);
$status->setValue($frm["is_active"]);
}
return $this;
}
示例8: init
public function init()
{
$tr = Zend_Registry::get('tr');
$http_code = new Zend_Form_Element_Text('http_code');
$http_code->setLabel($tr->_('HTTP_CODE'));
$http_code->setRequired(false);
$this->addElement($http_code);
$name = new Zend_Form_Element_Text('name');
$name->setLabel($tr->_('NAME'));
$name->setRequired(true);
$this->addElement($name);
$msg = new Zend_Form_Element_Textarea('message');
$msg->setLabel($tr->_('ERROR_MESSAGE'));
$msg->setAttribs(array('rows' => 10, 'cols' => 35));
$msg->setRequired(true);
$this->addElement($msg);
/** Maybe next version will have it back.
$action = new Default_Model_Action;
$all = $action->getList();
$actions = new Zend_Form_Element_Multiselect('actions');
$actions->setLabel('Associated Actions with this Error');
$actions->setMultiOptions($all);
$actions->setAttrib('size', 8);
$this->addElement($actions);
*/
$desc = new Zend_Form_Element_Textarea('description');
$desc->cols = 35;
$desc->rows = 15;
$desc->setLabel($tr->_('DESCRIPTION'));
$desc->setRequired(false);
$this->addElement($desc);
$this->addElement(new Zend_Form_Element_Submit($tr->_('SUBMIT')));
parent::init();
}
示例9: init
public function init()
{
$http_code = new Zend_Form_Element_Text('http_code');
$http_code->setLabel('HTTP Code');
$http_code->setRequired(false);
$this->addElement($http_code);
$name = new Zend_Form_Element_Text('name');
$name->setLabel('Name');
$name->setRequired(true);
$this->addElement($name);
$msg = new Zend_Form_Element_Textarea('message');
$msg->setLabel('Error Message');
$msg->setAttribs(array('rows' => 10, 'cols' => 40));
$msg->setRequired(true);
$this->addElement($msg);
/** Maybe next version will have it back.
$action = new Default_Model_Action;
$all = $action->getList();
$actions = new Zend_Form_Element_Multiselect('actions');
$actions->setLabel('Associated Actions with this Error');
$actions->setMultiOptions($all);
$actions->setAttrib('size', 8);
$this->addElement($actions);
*/
$desc = new Zend_Form_Element_Textarea('description');
$desc->cols = 40;
$desc->rows = 15;
$desc->setLabel('Description');
$desc->setRequired(false);
$this->addElement($desc);
$this->addElement(new Zend_Form_Element_Submit('submit'));
parent::init();
}
示例10: Frm_table_type
public function Frm_table_type($data = null)
{
$menu_code = new Zend_Form_Element_Text('type_code');
$menu_code->setAttribs(array('class' => 'form-control', 'required' => true));
$description = new Zend_Form_Element_Text('description');
$description->setAttribs(array('class' => 'form-control'));
$lang_1 = new Zend_Form_Element_Text('lang_1');
$lang_1->setAttribs(array('class' => 'form-control'));
$lang_2 = new Zend_Form_Element_Text('lang_2');
$lang_2->setAttribs(array('checked' => 'checked', 'class' => 'form-control'));
$lang_3 = new Zend_Form_Element_Text('lang_3');
$lang_3->setAttribs(array('checked' => 'checked', 'class' => 'form-control'));
if ($data != null) {
// print_r($data);
}
$show_description = new Zend_Form_Element_Select('show_description');
$show_description->setAttribs(array('class' => 'form-control'));
$description_opt = array("" => $this->tr->translate("SELECT_DESCRIPTION"));
$show_description->setMultiOptions($description_opt);
$photo = new Zend_Form_Element_File('photo');
$background = new Zend_Form_Element_Text('background');
$background->setAttribs(array('class' => 'form-control color-picker-rgba'));
$font_color = new Zend_Form_Element_Text('font_color');
$font_color->setAttribs(array('class' => 'form-control', 'id' => "selected-color1"));
$font_size = new Zend_Form_Element_Text('demo3');
$font_size->setAttribs(array('class' => 'form-control', 'id' => "demo3", 'value' => 12, 'placeholder' => '12'));
$apply = new Zend_Form_Element_Select('apply');
$apply->setAttribs(array('class' => 'form-control'));
$apply_opt = array("" => $this->tr->translate("SELECT_APPLY_TO_COMPANY"));
$apply->setMultiOptions($apply_opt);
$combo = new Zend_Form_Element_Checkbox('combo');
$combo->setAttribs(array('class' => 'red'));
$active = new Zend_Form_Element_Checkbox('active');
$active->setAttribs(array('class' => 'red'));
$format = new Zend_Form_Element_Text('demo4');
$format->setAttribs(array('class' => 'form-control', 'id' => "demo4", 'value' => 12, 'placeholder' => '12'));
$setting = new Zend_Form_Element_Select('setting');
$setting->setAttribs(array('class' => 'form-control'));
$setting_opt = array("" => $this->tr->translate("SELECT_SETTING"));
$setting->setMultiOptions($setting_opt);
$arrange = new Zend_Form_Element_Text('arrange');
$arrange->setAttribs(array('class' => 'form-control'));
$resize = new Zend_Form_Element_Text('resize');
$resize->setAttribs(array('class' => 'form-control', 'id' => "resize", 'value' => 12, 'placeholder' => '12'));
$note = new Zend_Form_Element_Textarea('note');
$note->setAttribs(array('class' => 'form-control', 'style' => "margin-top: 0px; margin-bottom: 0px; height: 100px;"));
$id = new Zend_Form_Element_Hidden('id');
if ($data != null) {
$id->setValue($data['id']);
$menu_code->setValue($data['code']);
$description->setValue($data['description']);
$lang_1->setValue($data['lang1']);
$lang_2->setValue($data['lang2']);
$note->setValue($data['note']);
}
$this->addElements(array($id, $apply, $active, $combo, $menu_code, $description, $lang_1, $lang_2, $lang_3, $show_description, $background, $font_color, $font_size, $format, $setting, $arrange, $resize, $note));
return $this;
}
示例11: frm_table_time_charge
public function frm_table_time_charge($data = null)
{
$menu_code = new Zend_Form_Element_Text('menu_code');
$menu_code->setAttribs(array('class' => 'form-control'));
$description = new Zend_Form_Element_Text('description');
$description->setAttribs(array('class' => 'form-control', 'required' => true));
$amount_to_charge = new Zend_Form_Element_Text('amount_to_charge');
$amount_to_charge->setAttribs(array('class' => 'form-control'));
$free_amt = new Zend_Form_Element_Text('free_amt');
$free_amt->setAttribs(array('class' => 'form-control'));
$child = new Zend_Form_Element_Text('child');
$child->setAttribs(array('checked' => 'checked', 'class' => 'form-control'));
$show_description = new Zend_Form_Element_Text('show_description');
$show_description->setAttribs(array('class' => 'form-control'));
$photo = new Zend_Form_Element_File('photo');
$background = new Zend_Form_Element_Text('background');
$background->setAttribs(array('class' => 'form-control color-picker-rgba'));
$font_color = new Zend_Form_Element_Text('font_color');
$font_color->setAttribs(array('class' => 'form-control', 'id' => "selected-color1"));
$interval_time = new Zend_Form_Element_Text('interval_time');
$interval_time->setAttribs(array('class' => 'form-control'));
$apply = new Zend_Form_Element_Select('apply');
$apply->setAttribs(array('class' => 'form-control'));
$apply_opt = array("" => $this->tr->translate("SELECT_APPLY_TO_COMPANY"));
$apply->setMultiOptions($apply_opt);
$combo = new Zend_Form_Element_Checkbox('combo');
$combo->setAttribs(array('class' => 'red'));
$active = new Zend_Form_Element_Checkbox('active');
$active->setAttribs(array('class' => 'form-control'));
$execute_number = new Zend_Form_Element_Text('execute_number');
$execute_number->setAttribs(array('class' => 'form-control'));
$setting = new Zend_Form_Element_Select('setting');
$setting->setAttribs(array('class' => 'form-control'));
$setting_opt = array("" => $this->tr->translate("SELECT_SETTING"));
$setting->setMultiOptions($setting_opt);
$arrange = new Zend_Form_Element_Text('arrange');
$arrange->setAttribs(array('class' => 'form-control'));
$resize = new Zend_Form_Element_Text('resize');
$resize->setAttribs(array('class' => 'form-control', 'id' => "resize", 'value' => 12, 'placeholder' => '12'));
$note = new Zend_Form_Element_Textarea('note');
$note->setAttribs(array('class' => 'form-control', 'style' => "margin-top: 0px; margin-bottom: 0px; height: 100px;"));
$id = new Zend_Form_Element_Hidden('id');
if ($data != null) {
// print_r($data);
$id->setValue($data['id']);
$description->setValue($data['description']);
$interval_time->setValue($data['time_interval']);
$execute_number->setValue($data['execute_amount']);
$amount_to_charge->setValue($data['fee_charge']);
$free_amt->setValue($data['free_amount']);
$child->setValue($data['chil_per']);
$active->setValue($data['nul_mul']);
}
$this->addElements(array($id, $apply, $active, $combo, $menu_code, $description, $amount_to_charge, $free_amt, $child, $show_description, $background, $font_color, $interval_time, $execute_number, $setting, $arrange, $resize, $note));
return $this;
}
示例12: __construct
public function __construct($options = null)
{
$subject = new Zend_Form_Element_Text('subject');
$subject->setAttribs(array('size' => 50))->addFilter('StringTrim');
$message = new Zend_Form_Element_Textarea('message');
$message->setAttribs(array('rows' => 3, 'cols' => 50))->addFilter('StripTags')->addFilter('StringTrim')->addValidators(array(array('StringLength', false, array(0, 140))));
$submit = new Zend_Form_Element_Submit('submit');
$submit->setLabel($this->getView()->translate('Save'));
$this->addElements(array($subject, $message, $submit));
}
示例13: FrmMenu
public function FrmMenu($data = null)
{
//$db = new menu_Model_DbTable_DbMenuGroup();
$menu_code = new Zend_Form_Element_Text('menu_code');
$menu_code->setAttribs(array('class' => 'form-control', "data-required" => "1", 'aria-describedby' => 'name-error name-error', 'aria-invalid' => 'true'));
$description = new Zend_Form_Element_Text('description');
$description->setAttribs(array('class' => 'form-control', "data-required" => "1"));
$lang_1 = new Zend_Form_Element_Text('lang_1');
$lang_1->setAttribs(array('class' => 'form-control', "data-required" => "1"));
$lang_2 = new Zend_Form_Element_Text('lang_2');
$lang_2->setAttribs(array('checked' => 'checked', 'class' => 'form-control'));
if ($data != null) {
// print_r($data);
}
$show_description = new Zend_Form_Element_Select('show_description');
$show_description->setAttribs(array('class' => 'form-control'));
$description_opt = array(0 => $this->tr->translate("SELECT_DESCRIPTION"), 1 => $this->tr->translate("CODE"), 2 => $this->tr->translate("DESCRIPTION"), 3 => $this->tr->translate("LANG_ONE"), 4 => $this->tr->translate("LANG_TWO"));
$show_description->setMultiOptions($description_opt);
$photo = new Zend_Form_Element_File('photo');
$background = new Zend_Form_Element_Text('background');
$background->setAttribs(array('class' => 'form-control color-picker-rgba'));
$font_color = new Zend_Form_Element_Text('font_color');
$font_color->setAttribs(array('class' => 'form-control', 'id' => "selected-color1"));
$font_size = new Zend_Form_Element_Text('demo3');
$font_size->setAttribs(array('class' => 'form-control', 'id' => "demo3", 'value' => 12, 'placeholder' => '12'));
$apply = new Zend_Form_Element_Select('apply');
$apply->setAttribs(array('class' => 'form-control'));
$apply_opt = array("" => $this->tr->translate("SELECT_APPLY_TO_COMPANY"));
$apply->setMultiOptions($apply_opt);
$combo = new Zend_Form_Element_Checkbox('combo');
$combo->setAttribs(array('class' => 'red'));
$active = new Zend_Form_Element_Checkbox('active');
$active->setAttribs(array('class' => 'red'));
$format = new Zend_Form_Element_Text('demo4');
$format->setAttribs(array('class' => 'form-control', 'id' => "demo4", 'value' => 12, 'placeholder' => '12'));
$setting = new Zend_Form_Element_Select('setting');
$setting->setAttribs(array('class' => 'form-control'));
$setting_opt = array("" => $this->tr->translate("SELECT_SETTING"));
$setting->setMultiOptions($setting_opt);
$arrange = new Zend_Form_Element_Text('arrange');
$arrange->setAttribs(array('class' => 'form-control'));
$resize = new Zend_Form_Element_Text('resize');
$resize->setAttribs(array('class' => 'form-control', 'id' => "resize", 'value' => 12, 'placeholder' => '12'));
$note = new Zend_Form_Element_Textarea('note');
$note->setAttribs(array('class' => 'form-control', 'style' => "margin-top: 0px; margin-bottom: 0px; height: 100px;"));
$this->addElements(array($apply, $active, $combo, $menu_code, $description, $lang_1, $lang_2, $show_description, $background, $font_color, $font_size, $format, $setting, $arrange, $resize, $note));
if ($data != "") {
$menu_code->setValue($data['menu_group_code']);
$description->setValue($data['menu_group']);
$lang_1->setValue($data['menu_group2']);
$lang_2->setValue($data['menu_group3']);
$show_description->setValue($data['show_group']);
}
return $this;
}
示例14: init
public function init()
{
// agenda_cancelado_motivo
$agenda_cancelado_motivo = new Zend_Form_Element_Textarea("agenda_cancelado_motivo");
$agenda_cancelado_motivo->setLabel("Motivo cancelamento: ");
$agenda_cancelado_motivo->setRequired();
$agenda_cancelado_motivo->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
$agenda_cancelado_motivo->setAttribs(array('class' => 'form-control', 'placeholder' => 'Informe o motivo do cancelamento', 'rows' => 10));
$this->addElements(array($agenda_cancelado_motivo));
parent::init();
}
示例15: init
public function init()
{
$this->name = new Zend_Form_Element_Text('name');
$this->new_password = new Zend_Form_Element_Password('new_password');
$this->confirm_password = new Zend_Form_Element_Password('confirm_password');
$this->email = new Zend_Form_Element_Text('email');
$this->biography = new Zend_Form_Element_Textarea('biography');
$this->submit = new Zend_Form_Element_Submit('submit');
$email_validator = new Zend_Validate_EmailAddress();
$email_validator->setDeepMxCheck(false);
$email_validator->setDomainCheck(false);
$email_validator->setMessages(array(Zend_Validate_EmailAddress::INVALID_FORMAT => "Format Email Salah"));
$confirm_password_validator = new Zend_Validate_Identical();
$confirm_password_validator->setMessage("Kata sandi tidak cocok.");
$this->biography->setAttribs(array('style' => 'width:100%;height:240px'));
$this->name->setAttribs(array('class' => 'span6', 'placeholder' => 'Nama lengkap anda'));
$this->email->addValidator($email_validator)->setAttribs(array('class' => 'span4', 'placeholder' => 'pengguna@contoh.com'));
$this->submit->setAttribs(array('class' => 'btn btn-success'))->setLabel('Simpan');
$this->confirm_password->addValidator($confirm_password_validator);
$this->addElements(array($this->name, $this->new_password, $this->confirm_password, $this->email, $this->biography, $this->submit));
$this->setElementDecorators(array('ViewHelper', 'Errors'));
}