I am using the code found [HERE] where I am using a hidden field to place text inside an HTML field. Everything is working correctly when the form loads, but when I submit, using a custom HTML button (different html field), the value does not appear in the submission. Below is the code I am using to place this field inside my HTML DIV.
//Insert SAF Number var SAF = $('#SAF'); var SafSource = $('#q64 div.cf-field INPUT'); SafSource.remove(); SafSource.insertAfter(SAF);
Here is my HTML code:
<p style="text-align: center;"><b><font size="5.5">Service Authorization Form</font></b></p> <div style="border-style: none; text-align: center;"><div id="SAF"></div></div>
Custom Button HTML:
<div style="text-align: center;"><font size="5"><button class="approve">Approve</button> <button class="reject">Reject</button></font></div>
Button Javascript:
//Button clicks $('button.approve').click(function() { $('#q75 input').val("approve"); }); $('button.reject').click(function() { $('#q75 input').val("reject"); });
Here is what I see when the form loads:
Here is what I see when the form is submitted:
Thanks,
Nate