lundi 18 septembre 2017

how to keep the checkbox checked and disabled once it is submitted through form

in my form i have list of checkboxes, i want to show the the check boxes checked and disabled if it is checked and submitted once.

this is my code,

@if(!empty($sublaws))
                            <ul style="list-style:none;">
                            <li class="law_">
                                <input type="checkbox" name="law_type_id[]" id="law_type_id" class="delclass" value="" reldeltype="" />
                                <strong> (  )</strong>
                                <ul style="list-style:none;">
                                    @foreach ($sublaws as $sublaw)
                                        <li>
                                            <input type="checkbox" name="law_sub_type_id[]" id="law_sub_type_id" value="" class="delsubclass" reldeltype="" reldelsubtype="" />
                                             (  )</li>
                                    @endforeach
                                </ul>
                            </li>
                        </ul>
                     @endif

Aucun commentaire:

Enregistrer un commentaire