I'm trying to submit this form when the page loads. But for some reason it doesn't work. I checked the console for errors and nothing seems to be wrong there.
Here's the html plus javascript(added the jquery)
<script type="text/javascript">
$(document).ready(function() {
$('#new-ticket-form').submit();
});
</script>
<form id="new-ticket-form" action="/contact_form.html" method="post" name = "new-ticket-form" >
<input type="hidden" name="MAX_FILE_SIZE" value="100000000">
<input type="hidden" name="fullname" value="JOhnny test'">
<input type="hidden" name="order_num" value="123456">
<input type="hidden" name="phone" value="347-489-4874">
<input type="hidden" name="email" value="fake123@gmail.com">
<input type="hidden" name="fromorderpage" value="yes">
<input type="hidden" name="submit" value="Submit">
<table>
<tr>
<td class="label">
New Ticket Subject:
</td>
<td class="field">
<select name="subject_id">
<option value="0">Select one ...</option>';
<option value="123">Confirm Delivery Appointment</option>';
<option value="124"> Reschedule Delivery Appointment</option>
</select>
</td>
</tr>
<tr>
<td class="label">
Summary:
</td>
<td class="field">
<input type="text" name="summary" value="This is a test disregard">
</td>
</tr>
<tr>
<td class="label">
Your Message:
</td>
<td class="field">
<textarea name="usr_msg" placeholder = "This is a test disregard">This is a test disregard</textarea>
</td>
</tr>
<tr>
<td class="submit" colspan="2"><input type="submit" value="Submit Ticket" name = "btn_submit">
</td>
</tr>
</table>
</form>