Example #1
0
$form->startFieldset('Please fill in this form to contact us');
$form->setOptions(array('horizontalElementCol' => 'col-xs-6'));
$form->groupInputs('user-name', 'user-first-name');
$form->addInputWrapper('<div class="input-group"></div>', 'user-name');
$form->addHtml('<div class="input-group-addon"><span class="glyphicon glyphicon-user"></span></div>', 'user-name', 'before');
$form->addInput('text', 'user-name', '', '', 'required=required, placeholder=Name*');
$form->addInput('text', 'user-first-name', '', '', 'placeholder=First Name');
$form->setOptions(array('horizontalElementCol' => 'col-xs-12'));
$form->addInputWrapper('<div class="input-group"></div>', 'user-email');
$form->addHtml('<div class="input-group-addon"><span class="glyphicon glyphicon-envelope"></span></div>', 'user-email', 'before');
$form->addInput('email', 'user-email', '', '', 'required=required, placeholder=Email*');
$form->addInputWrapper('<div class="input-group"></div>', 'user-phone');
$form->addHtml('<div class="input-group-addon"><span class="glyphicon glyphicon-earphone"></span></div>', 'user-phone', 'before');
$form->addInput('text', 'user-phone', '', '', 'placeholder=Phone');
$form->addHtml('<span class="help-block">If other, please tell us more ... </span>', 'subject', 'after');
$form->addOption('subject', '', 'Your request concerns ...');
$form->addOption('subject', 'Support', 'Support', '', 'data-icon=glyphicon glyphicon-info-sign text-warning');
$form->addOption('subject', 'Sales', 'Sales', '', 'data-icon=glyphicon glyphicon-usd text-warning');
$form->addOption('subject', 'Other', 'Other', '', 'data-icon=glyphicon glyphicon-question-sign text-warning');
$form->addSelect('subject', '', 'class=selectpicker');
$form->addHtml('<div class="hidden-wrapper off">');
$form->addInput('text', 'subject-other', '', '', 'placeholder=Please tell more about your request ...');
$form->addHtml('</div>');
$form->addTextarea('message', 'Your message ...', '', 'cols=30, rows=4, required=required');
$form->addPlugin('tinymce', '#message', 'contact-config');
$form->addCheckbox('newsletter-checkboxes', 'Suscribe to Newsletter', 'newsletter', 1, 'checked=checked');
$form->printCheckboxGroup('newsletter-checkboxes', '');
$options = array('horizontalLabelCol' => 'col-sm-3', 'horizontalOffsetCol' => 'col-sm-offset-3', 'horizontalElementCol' => 'col-sm-9');
$form->setOptions($options);
$form->addBtn('submit', 'submit-btn', 1, 'Send <span class="glyphicon glyphicon-envelope append"></span>', 'class=btn btn-success');
$form->endFieldset();