Note that there are some explanatory texts on larger screens.

plurals
  1. POValidation for the more elements which is in div block after checked one checkbox only
    primarykey
    data
    text
    <p>I am working in PHP using codeigniter framework, My question is actually i want to implement the one functionality as like the there are four checkboxes while click on one checkbox there is div open which contain three other fields which are the required so validation is applicable to only that field and while we checked to other anycheckbox there is another div open and also validation is applicable to that div only when it is open so plz guide me for this i want jquery validation</p> <p>Here is sample code</p> <pre><code>if($('#exactplate').attr('checked','checked')) { $('#exact_plate').show(); }else { $('#exact_plate').hide(); } }); </code></pre> <p>My html </p> <pre><code> &lt;li class="sctionbr"&gt; &lt;label&gt;&amp;nbsp;Exact number plate&lt;/label&gt; &lt;div class="fl"&gt; &lt;input type="checkbox" name="exactplate" id="exactplate" value="yes" class="txtbox2" onchange="exactPlate()" /&gt;&lt;br/&gt; &lt;/div&gt; &lt;/li&gt; </code></pre> <p>open div after checked</p> <pre><code>&lt;div style="display:none;" id="exact_plate" &gt; &lt;li&gt; &lt;label&gt;&lt;span class="red"&gt;*&lt;/span&gt;&amp;nbsp;Exact number plate&lt;/label&gt; &lt;div class="fl"&gt; &lt;input type="text" name="description3" id="description3" readonly="true" value="&lt;?php echo $result-&gt;plate_title;?&gt;" class="txtbox2" /&gt;&lt;br/&gt; &lt;/div&gt; &lt;/li&gt; &lt;?}?&gt; &lt;li&gt; &lt;label&gt;&lt;span class="red"&gt;*&lt;/span&gt;&amp;nbsp;Price&lt;/label&gt; &lt;div class="fl"&gt; &lt;input type="text" name="budget3" id="budget3" alt="ch" value="&lt;?php echo set_value('budget3')?&gt;" class="txtbox2" /&gt;&amp;nbsp; &amp;pound;&lt;br/&gt; &lt;?php if(form_error('budget3')) { echo form_error('budget3'); }?&gt; &lt;/div&gt; &lt;/li&gt; &lt;li&gt; &lt;label&gt;&lt;span class="red"&gt;*&lt;/span&gt;&amp;nbsp; Estimated delivery time&lt;/label&gt; &lt;div class="fl"&gt; &lt;input type="text" alt="number" name="period3" id="period3" value="&lt;?php echo set_value('period3')?&gt;" class="txtbox2" /&gt;&amp;nbsp;Days&lt;br/&gt; &lt;?php if(form_error('period3')) { echo form_error('period3'); }?&gt; &lt;/div&gt; &lt;/li&gt; &lt;li class="sctionbr"&gt;&amp;nbsp;&lt;/li&gt; &lt;/div&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload