Jump to content

- - - - -

Desperately Seeking Code Help!

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1 elyons3683


    Advanced Member

  • Members
  • PipPipPip
  • 88 posts

Posted 04 May 2010 - 09:32 PM

I have a form on a page of my site that has three fields. I'd like all 3 fields to be required. I'd also like the form to submit to my email, so that I have a record of the names and e-mails, but also redirect the submitter to another page. I've gotten these last two pieces to work (submitting to my email and redirecting the submitter to a new page) but need help with what code to add to make the fields required. The code that is there presently (on www.elizabethlyons.com/bonus.html) is: <form action="http://www.bluehost.com/bluemail" enctype="multipart/form-data" method="POST"> <p> Name: <input name="name" type="text" /> Email: <input name="email" type="text" /> Amazon Order Number: <input name="ordernumber" type="text" /> <input name="redirect" value="http://www.elizabethlyons.com/bonus-downloads.html" type="hidden" /><font color="#ff3300">*Where can I find my Amazon.com order number? <input name="sendtoemail" value="elizabeth@elizabethlyons.com" type="hidden" /> <input value="Click to Get Bonus Gifts" type="submit" /> </p> </form> There are not words to express how grateful I will be to learn how to do this! Anyone know what code I'm missing? (I assume it's javascript, but I'm not sure where to place it or how it should read) THANK YOU! Liz

#2 justme


    Advanced Member

  • Members
  • PipPipPip
  • 80 posts

Posted 05 May 2010 - 02:27 AM

Liz Forms have always been one of the most troublesome things to do. It appears you are using bluehost's own form. I did a quick search and I'm not sure their script allows required fields. There are countless form plugins available for WordPress which you might want to consider. Probably will end up happier. You can start at

Please Login or Register to see this Hidden Content

and search for forms or contact forms. Contact Form 7 is one of the more popular but there are many good ones including cforms. Gravity Forms is getting a lot of heat right now - they are a premium (paid rather than free) option but appear to be a great choice if you need a lot of features:

Please Login or Register to see this Hidden Content

Others may chime in with their favorites.

#3 bryan-hadaway



  • Members
  • PipPipPipPipPip
  • 3697 posts

Posted 05 May 2010 - 07:22 AM

Hi, remove the code you've added, and back that up somewhere, I'm all for learning if you want to later. When working with WordPress it's usually best to play nice.

So depending on what PageLines theme you're using you should already have a plugin called cforms which you can on-the-fly make forms to your hearts content very easily, then save it and post a very simple code tag where you want it to appear.

If you don't have it get it here:

Please Login or Register to see this Hidden Content

Let me know if you need further help.

Thanks, Bryan