I have multiple checkbox that can be selected by user, however i cant find out a way how to distinguish each values into 2 different textfield
As you can see i have multiple choice of checkbox, but user can only check 2 checkbox because it will set the timestamp range.
But, i end up with this code, and it does not work as i wanted as it displays the same thing in both texfield
$('input[type="checkbox"]').on('click', function() {
var is_checked = $(this).prop('checked');
var val = '';
if (is_checked) val = this.value;
$('input[text="input"]').val(val);
});
And it displays like this:
Aucun commentaire:
Enregistrer un commentaire