This question already has an answer here:
- Checking a checkbox with jQuery? 33 answers
I have a database field is_enabled - which set to either 'Yes' or 'No'.
Following checkbox will have to set as checked if the db field is 'Yes'.
<input name="enab" type="checkbox"> <label>Enabled Status: </label>
JQuery:
$('[name=enab]').val(values.enab);
Anyone please help.
Aucun commentaire:
Enregistrer un commentaire