Force input value to be empty
Hi Jake;
I have a form that has many rows. Each row looks like this ->
http://grab.by/zYBa
I want to make sure that there is only 1 text box able with a value more than 0 in each row. In this case either "piece" or "grams".
I currently found some code but this disables the other box and as a result does not submit the disabled value. I need both values to be submitted. 1 with actual number and the other with value of "" (whic is nothing).
I was wondering if you could help with this.
Thanks
- $('td input').on('input', function() {
$(this).closest('tr').find('input[type="text"]').not(this).prop('disabled', this.value.length)
});