Reputation: 23
I'm using FormMail through GoDaddy to process the form request, but it seems the sumbit button will not function correctly once all of the fields are entered. Below is the code that is used. If the fields are blank, the required notice is displayed, but it seems that when the fields are filled in, nothing happens. When the submit button is pressed, I want the page to go the redirect page (4th line of code below).
<form id="contact-form" action="http://www.mydomain.com/formmail/cgi-bin/FormMail.pl" method="post" >
<input type="hidden" name="recipient" value="[email protected]" / >
<input type="hidden" name="subject" value="WWW Message Form" / >
<input type="hidden" name="redirect" value="http://www.mydomain.com/index-6.html"/>
<div class="success">
Contact form submitted!<br>
<strong>We will be in touch soon.</strong>
</div>
<fieldset>
<label class="name">
<input type="text" name="name" value="Name:">
<span class="error">*This is not a valid name.</span> <span class="empty">*This field is required.</span>
</label>
<label class="email">
<input type="text" name="email" value="E-mail:">
<span class="error">*This is not a valid email address.</span> <span class="empty">*This field is required.</span>
</label>
<label class="phone">
<input type="tel" name="phone" value="Phone:">
<span class="error">*This is not a valid phone number.</span> <span class="empty">*This field is required.</span>
</label>
<label class="message">
<textarea name="message">Message:</textarea>
<span class="error">*The message is too short.</span> <span class="empty">*This field is required.</span>
</label>
<div class="buttons-wrapper">
<a class="button" data-type="reset">Clear</a>
<a class="button" data-type="submit">Submit</a>
</div>
</fieldset>
</form>
I edited my original question. I'm using js to submit the form. Below is the variable declarations that need to be made. I need assistance figuring out what goes where.
var th=$(this)
,_=th.data('forms')||{
errorCl:'error',
emptyCl:'empty',
invalidCl:'invalid',
notRequiredCl:'notRequired',
successCl:'success',
successShow:'4000',
mailHandlerURL:'bin/MailHandler.php',
ownerEmail:'[email protected]',
stripHTML:true,
smtpMailServer:'localhost',
targets:'input,textarea',
controls:'a[data-type=reset],a[data-type=submit]',
validate:true
Upvotes: 1
Views: 1565
Reputation: 22721
Try this,
<input type="submit" class="button" value="Submit" />
instead of
<a class="button" data-type="submit">Submit</a>
Upvotes: 3