1
<div class="form-group">
    <label class="col-sm-3 control-label label_alignment" for="class_description">
        <b>Description*</b>
    </label>
    <div class="col-sm-6">
        <!-- <textarea name="details" rows="4" class="form-control"  required="required" id="class_description"></textarea> -->
        <?php $data = array(
            'name' => 'details',
            'id' => 'class_description',
            'value'  => '',
            'rows' => '4',
            'required' => 'required',
            'class' => 'form-control',
            'required' => 'required',
            'minlength' => '50'
        );
        echo form_textarea($data); ?>
        <span class="red_color"></span>
    </div>
</div>
<div class="form-group">
    <label class="col-sm-3 control-label label_alignment" for="category">
        <b>Category of Class</b>
    </label>
    <div class="col-sm-6">
        <select  name="parent_cat" class="form-control city_picker select2-hidden-accessible" data-plugin="select2" id="countriesDrp" tabindex="-1" aria-hidden="true" required>
            <option value="" selected="selected" >Select City</option>
            <?php foreach($categories as $hg_city):?>
                <option value="<?php echo $hg_city->category_id?>"><?php echo $hg_city->categorie?></option>
            <?php endforeach;?>
        </select> 
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Adarsha Jha
  • 1,782
  • 2
  • 15
  • 37
  • 1
    Your `select` has the required attribute already...? Some description of what you're trying to do, why you want to do it and the problem you've having would help a lot here – Rory McCrossan Sep 28 '16 at 09:37
  • your already have required attribute . so try this attempt required="required" or required="true" – JYoThI Sep 28 '16 at 09:39

0 Answers0