Anybody? Please...
I am using NMS FormMail to submit a form on a site I am working on. I have set initial values in each field of the form and also have set hidden values so each field is required before the form is submitted. However, If the user clicks on the submit button with the form untouched it will send, but if each field is cleared it adheres to the required field 'Hidden' value.
Is there any way of preventing the form being submitted until the initial value has been edited in both fields? Thanks.
This is the Form code:
Code:<form class="feedback" name="feedback" method="post" action="cgi-bin/feedback.pl"> <input type="image" src="images/form-header.png" /> <textarea name="doing" cols="" class="doing">Tell us about your experience...</textarea> <textarea name="email" cols="" class="email">Enter your email address</textarea> <input type="image" src="images/form-bottom.png" /> <input name="submit" type="submit" class="submit" value="SUBMIT"/> <input type="hidden" name="required" value="doing"/> <input type="hidden" name="required" value="email"/> <input type="hidden" name="recipient" value="email address here"> <input type="hidden" name="subject" value="Title here" /> <input type="hidden" name="redirect" value="http://www.site.com/thanks.html" /> </form>
Anybody? Please...
your form looks fine,
These might not do much but try changing too small things.
Put your "required" fields into the one line of code
and change the line sequence
try this and see if this helps:
Code:<form class="feedback" name="feedback" method="post" action="cgi-bin/feedback.pl"> <input type="image" src="images/form-header.png" /> <textarea name="doing" cols="" class="doing">Tell us about your experience...</textarea> <textarea name="email" cols="" class="email">Enter your email address</textarea> <input type="image" src="images/form-bottom.png" /> <input name="submit" type="submit" class="submit" value="SUBMIT"/> <input type="hidden" name="required" value="doing,email"/> <input type="hidden" name="redirect" value="thank you page"/> <input type="hidden" name="recipient" value="email address here"> <input type="hidden" name="subject" value="Title here" /> </form>