lundi 19 octobre 2015

Set checkbox value from database [duplicate]

This question already has an answer here:

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