I know this is simple, but I cannot understand it today, and I cannot find the right solution.
I have a series of tabs that populate data. At the end there is a confirmation tab. At this point, they can click the submit button. When this button is pressed, the hidden form is filled with all the relevant data. I would like this form to be submitted, but I cannot figure out how to submit the form using JQUery. I tried to make a trigger on a button, but maybe I'm doing it wrong. Below is a sample code for the taht button. Please note that the values ββare filled out, I just can not get the form to submit
$('#submitAppointment').click(function() { $("#" + formName + "schedule_id option[value='" + $("input[name='appointmentTime']:checked").val() + "']").attr('selected', 'selected'); $("#" + formName + "apt_date").val($("#confirmDate").text()); $("#" + formName + "first_name").val($("#confirmFirstName").text()); $("#" + formName + "last_name").val($("#confirmLastName").text()); $("#" + formName + "email").val($("#confirmEmail").text()); $("#" + formName + "phone").val($("#confirmPhone").text()); $("#" + formName + "notes").val($("#confirmNotes").text()); $('#appt_form').submit(function() { alert('Handler for .submit() called.'); return false; }); });
Any ideas on what I need to do to raise the send function?
source share