I’m submitting a form with JS and I want to cancel the submit if any field is blank.
I’m getting all values with: $(reviewForm).serialize()
which returns something like:
id=2&text=aaaa&rating=2&gender=
How can I show an alert if any value in the form is blank?
using jQuery, you can test it before serializing: