Button disabled when data is call over still?
Solution 1:
You could filter
Alternatively give all fields a required
attribute, then the form cannot be submitted
const $fields = $('input[type="email"], input[type="text"], input[type="password"], input[id="confirm_password"], input[id="validationName"]')
const dis = function() {
const empty = $fields.filter(function() {
return this.value === ''
}).length > 0;
$(':button[type="submit"]').prop('disabled', empty)
};
$fields.keyup(dis)
dis()
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<form id="myForm">
<input type="email" value="@" />
<input type="text" />
<button type="submit">Submit</button>
</form>