How do I make my jQuery code execute before submit and before sending it to database? I\'m trying to take user input from checkbox, process it in jQuery and send this value