lundi 28 août 2017

How to create persist function on checkbox if data is present

I have seen many checkbox examples, but not this one.

I need a checkbox to remain checked if data is present in specific <input> fields. So it would need to be something that is constantly checking field status.

Basic checkbox:

<input class="checkbox" type="checkbox" unchecked onclick="shipping()"/>

It calls a function that removes a <div> and adds another. There is a back button on that new div that will remove/add as well. When the users are back to orig page, if they entered data in that shipping <div> the check box would be checked.

This is a PHP page so I am comfortable using javascript, jQuery or PHP. Just looking for the most reliable way.




Aucun commentaire:

Enregistrer un commentaire