How to define Contact-us page from code and admin panel as it is not defined - magento-1.9

Contact-us page in magento is not defined.
How I define the contact-us page from code and admin panel.
As there is no page in cms named as contact page.

Add the contact.xml in the layout folder
<layout version="0.1.0">
<default>
<reference name="footer_links">
<action method="addLink" translate="label title" module="contacts" ifconfig="contacts/contacts/enabled"><label>Contact Us</label><url>contacts</url><title>Contact Us</title><prepare>true</prepare></action>
</reference>
</default>
<contacts_index_index translate="label">
<label>Contact Us Form</label>
<reference name="head">
<action method="setTitle" translate="title" module="contacts"><title>Contact Us</title></action>
</reference>
<reference name="root">
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
<action method="setHeaderTitle" translate="title" module="contacts"><title>Contact Us</title></action>
</reference>
<reference name="content">
<block type="core/template" name="contactForm" template="contacts/form.phtml"/>
</reference>
</contacts_index_index>
</layout>
Create the contact us page in cms and this code
{{block type="core/template" name="contactForm" template="contacts/form.phtml"}}
create the template file in the Following path app\design\frontend\theme\default\template\contacts\form.phtml
Add the contact form design.For Example
<div id="messages_product_view"><?php echo $this->getMessagesBlock()->toHtml() ?></div>
<section id="pr-contact" class="pr-main">
<div class="container"><h1 class="ct-header"><?php echo Mage::helper('contacts')->__('Contact Us') ?></h1></div>
<div class="contact-map">
</div>
<div class="container">
<div class="col-md-3 col-sm-3 col-xs-12">
<div class="address">
<i class="fa fa-home"></i>
<p>
<span>Address</span><br/>
</p>
</div>
<div class="phone">
<i class="fa fa-phone"></i>
<p>
<span>Phone no:</span>
</p>
</div>
<div class="fax">
<i class="fa fa-fax"></i>
<p>
<span>Fax</span>
</p>
</div>
<div class="website">
<i class="fa fa-globe"></i>
<p>
<span>Website:</span>
</p>
</div>
</div>
<!--<form action="<?php echo $this->getFormAction(); ?>" id="contactForm" method="post" class="scaffold-form">-->
<form action="<?php echo $this->getFormAction(); ?>" id="contactForm" method="post" enctype="multipart/form-data">
<div class="col-md-6 col-sm-6 col-xs-12">
<input name="name" id="name" title="<?php echo Mage::helper('core')->quoteEscape(Mage::helper('contacts')->__('Name')) ?>" value="<?php echo $this->escapeHtml($this->helper('contacts')->getUserName()) ?>" class="input-text required-entry name" type="text" placeholder="Enter your name *"/>
<input name="email" id="email" title="<?php echo Mage::helper('core')->quoteEscape(Mage::helper('contacts')->__('Email')) ?>" value="<?php echo $this->escapeHtml($this->helper('contacts')->getUserEmail()) ?>" class="input-text required-entry validate-email email" type="email" autocapitalize="off" autocorrect="off" spellcheck="false" placeholder="Enter E-mail *"/>
<input name="telephone" id="telephone" title="<?php echo Mage::helper('core')->quoteEscape(Mage::helper('contacts')->__('Telephone')) ?>" value="" class="input-text" type="tel" placeholder="Enter Telephone *" />
<textarea name="comment" id="comment" title="<?php echo Mage::helper('core')->quoteEscape(Mage::helper('contacts')->__('Comment')) ?>" class="required-entry input-text" cols="50" rows="10">Message *</textarea>
<!--<p>Ask us a question and we'll write back to you promptly! Simply fill out the form below and click Send Email.</p>
<p>Thanks. Items marked with an asterisk (<span class="star">*</span>) are required fields.</p>-->
<li>
<label for="attachment"><?php echo Mage::helper('contacts')->__('Attachment') ?></label>
<div class="input-box">
<input name="MAX_FILE_SIZE" type="hidden" value="2000000" />
<input name="attachment" id="attachment" class="input-text" type="file" />
</div>
</li>
<button type="submit" title="<?php echo Mage::helper('core')->quoteEscape(Mage::helper('contacts')->__('Submit')) ?>" class="button sendmail"><span><span><?php echo Mage::helper('contacts')->__('Submit') ?></span></span></button>
</div>
<div class="col-md-3 col-sm-3 col-xs-12">
</div>
</form>
</div>
</section>
<script type="text/javascript">
//<![CDATA[
var contactForm = new VarienForm('contactForm', true);
//]]>
</script>

Related

Upload files to a form

I have a form on my website to allow clients to submit inquiries but I need to add the option of adding files, in this case, it would be photos.
I can't find the proper solution for this. I'm new on this matter and I hope someone can help me.
Here it is the code i have about the form:
<form enctype="multipart/form-data" name="<?=$form_name?>" id="<?=$form_name?>" method="post" action="javascript:void(0);" >
<input type="hidden" name="lang" id="lang" value="<?=$_SESSION["lang"]?>" />
<input type="hidden" name="car_id" id="car_id" value="<?=$_SESSION["car_id"]?>" />
<input type="hidden" name="current_url" id="current_url" value="<?=$_SESSION["current_url"]?>" />
<!--NOME-->
<div class="form-group">
<? $input_name = $form_name."_"."name"; ?>
<label for="<?=$input_name?>"><?=NAME?>*</label>
<input type="text" class="{target:'#<?=$input_name?>_status',tagToload:{'.<?=$input_name?>':'#<?=$input_name?>_status','.script':'#<?=$result_div?>'}} form-control watermark required" name="<?=$input_name?>" value="<?=$_POST[$input_name]?>" id="<?=$input_name?>" placeholder="<?=NAME_PLACEHOLDER?>">
</div>
<!--END NOME-->
<!--EMAIL-->
<div class="form-group">
<? $input_name = $form_name."_"."email"; ?>
<label for="<?=$input_name?>"><?=EMAIL?>*</label>
<input type="email" class="{target:'#<?=$input_name?>_status',tagToload:{'.<?=$input_name?>':'#<?=$input_name?>_status','.script':'#<?=$result_div?>'}} form-control watermark required" name="<?=$input_name?>" value="<?=$_POST[$input_name]?>" id="<?=$input_name?>" placeholder="<?=EMAIL_PLACEHOLDER?>">
</div>
<!--END EMAIL-->
<!--SUBJECT-->
<div class="form-group">
<? $input_name = $form_name."_"."subject_other"; ?>
<label for="<?=$input_name?>"><?=SUBJECT?>*</label>
<input type="text" class="{target:'#<?=$input_name?>_status',tagToload:{'.<?=$input_name?>':'#<?=$input_name?>_status','.script':'#<?=$result_div?>'}} form-control watermark required" name="<?=$input_name?>" value="<?=$_SESSION['subject']?>" id="<?=$input_name?>" placeholder="<?=SUBJECT_PLACEHOLDER?>" <?=(isset($_SESSION["subject"])) ? 'readonly="readonly"' : ''?>>
</div>
<!--END SUBJECT-->
<!--MESSAGE-->
<div class="form-group" style="margin-bottom: 10px;">
<? $input_name = $form_name."_"."message"; ?>
<label for="<?=$input_name?>"><?=MESSAGE?>*</label>
<textarea class="{target:'#<?=$input_name?>_status',tagToload:{'.<?=$input_name?>':'#<?=$input_name?>_status','.script':'#<?=$result_div?>'}} form-control watermark required" name="<?=$input_name?>" id="<?=$input_name?>" placeholder="<?=MESSAGE_PLACEHOLDER?>" rows="3"></textarea>
</div>
<!--END MESSAGE-->
<span class="blue_label blue_label_block blue_label_small" style="text-align: left;">* Campos de preenchimento obrigatório.</span>
<div class="form-group pull-right" style="margin-bottom: 20px;">
<input type="reset" class="btn btn-primary" value="<?=CLEAR?>">
<a type="button" class="btn btn-default ml20" id="formSubmitLink_<?=$form_name?>" href="javascript:;"><?=SEND?></a>
</div>
<br class="clear">
<div class="resultForm" id="<?=$result_div?>"></div>
<div class="form-group">
<label for="photo" class="col-lg-2 control-label">Photo</label>
<div class="col-lg-10">
<input type="file" class="form-control" id="photo" placeholder="Photo">
</div>
</div>

Form Inline and Horizontal With image

I'm trying to program a mixed form, horizontal and inline, with an image, but my bootstrap is not helping me.
Here is what I have:
Here is what I want:
And, finally, the code:
<form class='form-horizontal' method='post' enctype="multipart/form-data">
<div class='form-group'>
<label for='foto' class='sr-only'>Foto</label>
<img class='fotoassociado' src='../../<?php if($sqlcmd->Foto == '') {echo 'photos/no_photo.jpg';} else {echo $sqlcmd->Foto;} ?>' />
<input type='file' class='form-control' name='foto' id='foto' />
</div>
<div class='form-group'>
<label for='nome' class='sr-only'>Nome</label>
<input type='text' class='form-control' name='nome' id='nome' value='<?php echo $sqlcmd->Nome; ?>' />
</div>
<div class='form-group'>
<label for='email' class='sr-only'>E-mail</label>
<input type='email' class='form-control' name='email' id='email' value='<?php echo $sqlcmd->Email; ?>' />
</div>
<div class='form-group'>
<label for='rg' class='sr-only'>RG</label>
<input type='rg' class='form-control rg' name='rg' id='rg' value='<?php echo $sqlcmd->RG; ?>' />
</div>
<div class='form-group'>
<label for='cpf' class='sr-only'>CPF</label>
<input type='cpf' class='form-control cpf' name='cpf' id='cpf' value='<?php echo $sqlcmd->CPF; ?>' />
</div>
<div class='form-group'>
<label for='TelRes' class='sr-only'>Residencial</label>
<input type='text' class='form-control' name='TelRes' id='TelRes' value='<?php echo $sqlcmd->TelResidencial; ?>' />
</div>
<div class='form-group'>
<label for='TelCom' class='sr-only'>Comercial</label>
<input type='text' class='form-control' name='TelCom' id='TelCom' value='<?php echo $sqlcmd->TelComercial; ?>' />
</div>
<div class='form-group'>
<label for='TelCel' class='sr-only'>Celular</label>
<input type='text' class='form-control' name='TelCel' id='TelCel' value='<?php echo $sqlcmd->TelCelular; ?>' />
</div>
</form>
form.form-horizontal {
float: right;
width: 83%;
}
<head>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
</head> <body>
<img class='fotoassociado' src='https://s3.amazonaws.com/cloud.ohloh.net/attachments/72914/favicon_med.png' />
<form class='form-horizontal' method='post' enctype="multipart/form-data">
<div class='form-group' style="width: 80%;">
<label for='foto' class='sr-only'>Foto</label>
<input type='file' class='form-control' name='foto' id='foto' />
</div>
<div class='form-group'style="width: 80%;">
<label for='nome' class='sr-only'>Nome</label>
<input type='text' class='form-control' name='nome' id='nome' value='name' />
</div>
<div class='form-group'style="width: 40%;display: -webkit-inline-box;">
<label for='email' class='sr-only'>E-mail</label>
<input type='email' class='form-control' name='email' id='email' value='Email' />
</div>
<div class='form-group' style="width: 40%;display: -webkit-inline-box;">
<label for='rg' class='sr-only'>RG</label>
<input type='rg' class='form-control rg' name='rg' id='rg' value='RG' />
</div>
<div class='form-group' style="width: 30%;display: -webkit-inline-box;">
<label for='cpf' class='sr-only'>CPF</label>
<input type='cpf' class='form-control cpf' name='cpf' id='cpf' value='cpf' />
</div>
<div class='form-group' style="width: 30%;display: -webkit-inline-box;">
<label for='TelRes' class='sr-only'>Residencial</label>
<input type='text' class='form-control' name='TelRes' id='TelRes' value='TEl' />
</div>
<div class='form-group' style="width: 30%;display: -webkit-inline-box;">
<label for='TelCom' class='sr-only'>Comercial</label>
<input type='text' class='form-control' name='TelCom' id='TelCom' value='telc' />
</div>
<div class='form-group'>
<label for='TelCel' class='sr-only'>Celular</label>
<input type='text' class='form-control' name='TelCel' id='TelCel' value='telcal' />
</div>
</form>
</body>
Try having, the image and the labels you want inline, under the tag <span>
This might help.
Try floating the image. For example:
.fotoassociado {
float: left;
}
Or if you want that whole form group then you'll make that whole div float left, by either selecting the first form-group...
.form-group:first-of-type {
float: left;
}
or by adding an additional class.
<div class='form-group float-left'>
.float-left {
float: left;
}

2 forms that are mistakenly being submitted only to one

While trying to add an additional form to the site somehow the confirmation of the first form confirms the second form and the first form will not submit at all.
First form
<aside class="col-xs-12 col-sm-5 col-md-5 sidebar">
<form class="appointment-form dark" method="post" action="confirmation/index.php">
<h1>Request an Appointment</h1>
<div class="form-group">
<label for="first_name">First Name<span class="required">*</span></label>
<input type="text" class="form-control required" id="first_name" name="first_name">
</div>
<input type="hidden" name="current_url" value="<?php echo 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>"/>
</div>
<div class="form-group no-label">
<button class="btn" data-submitting="Requesting..." data-submitted="Requested <i class='fa fa-check'></i>">Request Now</button>
</div>
</form>
<div class="fancybox form-confirmation">
<div class="inside">
<h1>Thank you for requesting an appointment <span class="data-name"></span>! We'll get back to you shortly.</h1>
<i class="fa fa-check-circle-o"></i>
</div>
</div>
Second form
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Insurance Check</h4>
</div>
<div class="modal-body">
<form class="contact">
<style type="text/css">
.form-group-ic{margin-bottom:8px;}
span.alert{font-size:10px; padding:10px 0px;}
</style>
<div class="form-group-ic" style="width:44%;float:left;">
<label for="first_name_ic">First Name<span class="required">*</span></label>
<input type="text" class="form-control required" id="first_name_ic" name="first_name_ic">
</div>
<input type="hidden" name="current_url" value="<?php echo 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>"/>
<div class="form-group-ic no-label">
<input type="submit" id="submit" class="btn" style="background:#0e704b;" value="Request Now" />
</div>
</form>

Applying PURE html in view (.ctp file) in CakePHP

I just want to ask if it is possible to create a ctp file with pure html? Like for example, I want to add a form and my code will be:
<form>First name:<br><input type="text" name="firstname"><br>Last name:<br><input type="text" name="lastname"></form>
and not like this:
<?php echo $this->Form->create('User');?>
<fieldset>
<legend><?php __('Add User'); ?></legend>
<?php
echo $this->Form->input('lastname');
echo $this->Form->input('firstname');
echo $this->Form->input('email');
echo $this->Form->input('organizer_pic');
echo $this->Form->input('description');
echo $this->Form->input('website');
echo $this->Form->input('company');
echo $this->Form->input('organization');
echo $this->Form->input('contact_num');
echo $this->Form->input('username');
echo $this->Form->input('password');
echo $this->Form->input('group_id');
?>
</fieldset><?php echo $this->Form->end(__('Submit', true));?>
Do you guys think it is possible? I want it to be pure html because I'm having a hard time in creating a good layout with Bootstrap. I'm using CakePHP 1.3. Please let me know if you have an idea.
You can have pure html on a ctp file but you need to have an action in your controller as well. You can leave the action empty.
You should try this
<div class="row">
<div class="col-md-6">
<?php echo $this->Form->create('User');?>
<fieldset>
<legend><?php __('Add User'); ?></legend>
<div class="form-group has-feedback">
<label>Username</label>
<?php echo $this->Form->input('lastname',array('class'=>'form-control','label'=>false,'div'=>false));
?>
<i class="icon-users form-control-feedback"></i>
</div>
<div class="form-group has-feedback">
<label>firstname</label>
<?php echo $this->Form->input('firstname',array('class'=>'form-control','label'=>false,'div'=>false));
?>
<i class="icon-users form-control-feedback"></i>
</div>
<div class="form-group has-feedback">
<label>Email</label>
<?php echo $this->Form->input('email',array('class'=>'form-control','label'=>false,'div'=>false));
?>
<i class="icon-users form-control-feedback"></i>
</div>
<div class="form-group has-feedback">
<label>organizer_pic</label>
<?php echo $this->Form->input('organizer_pic',array('class'=>'form-control','label'=>false,'div'=>false));
?>
<i class="icon-users form-control-feedback"></i>
</div>
<div class="form-group has-feedback">
<label>description</label>
<?php echo $this->Form->input('description',array('class'=>'form-control','label'=>false,'div'=>false));
?>
<i class="icon-users form-control-feedback"></i>
</div>
<div class="form-group has-feedback">
<label>website</label>
<?php echo $this->Form->input('website',array('class'=>'form-control','label'=>false,'div'=>false));
?>
<i class="icon-users form-control-feedback"></i>
</div>
<div class="form-group has-feedback">
<label>company</label>
<?php echo $this->Form->input('company',array('class'=>'form-control','label'=>false,'div'=>false));
?>
<i class="icon-users form-control-feedback"></i>
</div>
<div class="form-group has-feedback">
<label>organization</label>
<?php echo $this->Form->input('organization',array('class'=>'form-control','label'=>false,'div'=>false));
?>
<i class="icon-users form-control-feedback"></i>
</div>
<div class="form-group has-feedback">
<label>contact number</label>
<?php echo $this->Form->input('contact_num',array('class'=>'form-control','label'=>false,'div'=>false));
?>
<i class="icon-users form-control-feedback"></i>
</div>
<div class="form-group has-feedback">
<label>username</label>
<?php echo $this->Form->input('username',array('class'=>'form-control','label'=>false,'div'=>false));
?>
<i class="icon-users form-control-feedback"></i>
</div>
<div class="form-group has-feedback">
<label>password</label>
<?php echo $this->Form->input('password',array('class'=>'form-control','label'=>false,'div'=>false));
?>
<i class="icon-users form-control-feedback"></i>
</div>
<div class="form-group has-feedback">
<label>group id</label>
<?php echo $this->Form->input('group_id',array('class'=>'form-control','label'=>false,'div'=>false));
?>
<i class="icon-users form-control-feedback"></i>
</div>
<div class="form-group has-feedback">
<?php
echo $this->Form->button('Submit',array('class'=>'btn btn-success btn-xs','div'=>false),array('escape'=>false)
);
?>
</div>
</fieldset><?php echo $this->Form->end();?>
</div>
</div>
Output
Html output
<div class="col-md-6">
<form action="/BTSSO/Users/demo/" id="UserDemoForm" method="post" accept-charset="utf-8"><div style="display:none;"><input type="hidden" name="_method" value="POST"/></div> <fieldset>
<legend></legend>
<div class="form-group has-feedback">
<label>Username</label>
<input name="data[User][lastname]" class="form-control" type="text" id="UserLastname"/> <i class="icon-users form-control-feedback"></i>
</div>
<div class="form-group has-feedback">
<label>firstname</label>
<input name="data[User][firstname]" class="form-control" type="text" id="UserFirstname"/> <i class="icon-users form-control-feedback"></i>
</div>
<div class="form-group has-feedback">
<label>Email</label>
<input name="data[User][email]" class="form-control" type="email" id="UserEmail"/> <i class="icon-users form-control-feedback"></i>
</div>
<div class="form-group has-feedback">
<label>organizer_pic</label>
<input name="data[User][organizer_pic]" class="form-control" type="text" id="UserOrganizerPic"/> <i class="icon-users form-control-feedback"></i>
</div>
<div class="form-group has-feedback">
<label>description</label>
<input name="data[User][description]" class="form-control" type="text" id="UserDescription"/> <i class="icon-users form-control-feedback"></i>
</div>
<div class="form-group has-feedback">
<label>website</label>
<input name="data[User][website]" class="form-control" type="text" id="UserWebsite"/> <i class="icon-users form-control-feedback"></i>
</div>
<div class="form-group has-feedback">
<label>company</label>
<input name="data[User][company]" class="form-control" type="text" id="UserCompany"/> <i class="icon-users form-control-feedback"></i>
</div>
<div class="form-group has-feedback">
<label>organization</label>
<input name="data[User][organization]" class="form-control" type="text" id="UserOrganization"/> <i class="icon-users form-control-feedback"></i>
</div>
<div class="form-group has-feedback">
<label>contact number</label>
<input name="data[User][contact_num]" class="form-control" type="text" id="UserContactNum"/> <i class="icon-users form-control-feedback"></i>
</div>
<div class="form-group has-feedback">
<label>username</label>
<input name="data[User][username]" class="form-control" maxlength="255" type="text" id="UserUsername" required="required"/> <i class="icon-users form-control-feedback"></i>
</div>
<div class="form-group has-feedback">
<label>password</label>
<input name="data[User][password]" class="form-control" type="password" id="UserPassword" required="required"/> <i class="icon-users form-control-feedback"></i>
</div>
<div class="form-group has-feedback">
<label>group id</label>
<select name="data[User][group_id]" class="form-control" id="UserGroupId">
</select> <i class="icon-users form-control-feedback"></i>
</div>
<div class="form-group has-feedback">
<button class="btn btn-success btn-xs" type="submit">Submit</button> </div>
</fieldset>
</form>
</div>
<form action="/project_name/users/add" id="UserAddForm" method="post">
First name:<br>
<input type="text" name="data[User][firstname]"><br>
Last name:<br>
<input type="text" name="data[User][lastname]"><br>
<input type="submit" value="Submit">
</form>
I think this not recomended solution
Use these keys if you need to inject some markup inside the output of the input() method:
echo $this->Form->input('field', array(
'before' => '--before--',
'after' => '--after--',
'between' => '--between---'
));
Output:
<div class="input">
--before--
<label for="UserField">Field</label>
--between---
<input name="data[User][field]" type="text" value="" id="UserField" />
--after--
</div>
Lot more customization can be done refer to following link
http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html#options

Set the property required at checkbox in bootstrap

I have a simple form with a text-input and two checkbox and I need to set the property "required" at checkbox (I need that at least one of that checkbox is checked).
<div class="control-group">
<label class="control-label" for="inputEmail"><?= $this->labelfieldEmail; ?></label>
<div class="controls">
<input type="text" name="email" id="emailField"
placeholder="Email" required>
</div>
</div>
<div class="control-group">
<label class="control-label" for="productField"><?= $this->labelfieldProduct; ?></label>
<div class="controls" >
<input type="checkbox" id="inlineCheckbox1" value="widget" name="product[]" <?php if ($this->selectedProduct == "widget") { echo "checked"; }?>/>
Widget for website
<br/>
<input type="checkbox" id="inlineCheckbox2" value="app" name="product[]" <?php if ($this->selectedProduct == "app") { echo "checked"; }?>/>
App mobile
</div>
</div>
Please, Any suggests?
EDIT
I tried to use jqBootstrapValidation library in the follow way, but it doesn't works:
1. add library
2. Add this into <head> tag:
<script>
$(function () {
$("input,select,textarea").not("[type=submit]").jqBootstrapValidation();
});
</script>
3 this is my form code:
<form class="form-horizontal" method="POST" action="<?= $this->baseUrl($this->pathBusinessThankyou);?>">
<div class="row-fluid">
<div class="row-fluid">
<br />
<div class="control-group">
<label class="control-label" for="inputName"><?= $this->labelfieldName; ?></label>
<div class="controls">
<input type="text" id="fullnameField" name="fullname" required />
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputEmail"><?= $this->labelfieldEmail; ?></label>
<div class="controls">
<input type="email" id="emailField" name="email" required />
</div>
</div>
<div class="control-group">
<label class="control-label" for="productField"><?= $this->labelfieldProduct; ?></label>
<div class="controls" >
<label class="checkbox">
<input type="checkbox"
data-validation-minchecked-message="<?= $this->validationOneProduct; ?>"
data-validation-minchecked-minchecked="1" value="widget" name="product[]"
<?php if ($this->selectedProduct == "widget") { echo "checked"; }?> />
Widget per il tuo sito
</label>
<label class="checkbox">
<input type="checkbox" value="app" name="product[]" aria-invalid="false"
<?php if ($this->selectedProduct == "app") { echo "checked"; }?> />
App per il tuo hotel
</label>
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputEmail"><?= $this->labelfieldNote; ?></label>
<div class="controls">
<textarea rows="3" name="comment" id="commentField"></textarea>
</div>
</div>
<div class="control-group">
<div class="controls">
<button type="submit" class="btn input-block-level btn-large btn-success">
<?= $this->labelSendRequest; ?>
<i class="icon-ok icon-white"></i>
</button>
</div>
</div>
</div>
</div>
</form>
A JQuery validation plugin for bootstrap forms:
http://reactiveraven.github.io/jqBootstrapValidation/
You are trying to run a validation with php while the page has already been loaded. For the validation to work each time you check another box, a script needs to run again to perform the validation. This is much easier to achieve with a jQuery script that executes each time a checkbox is clicked.