Jump to content

Contact Form Script


Recommended Posts

I am about to customize a wordpress theme.

So far so good but right know I get stuck with

the contact form script. (It?s a real nightmare

being a php noob).

Ok...this is the script: So my dumb question is -

What have I to insert for action="" ?

Where have I to insert my email address?

<div class="iconsidebar"></div>Fill Out The Form Below</p>


<!-- Form Code-->

<div>  <form method="post"  action="########"  >


                <input  type="text" name="first name" class="sidebarform1" value='Enter your first name' onFocus=" if (this.value == 'Enter your first name') { this.value = ''; }" onBlur="if (this.value == '') { this.value='Enter your first name';} "  />

<div style="clear:both;"></div>

                <input  type="text" name="Phone" class="sidebarform1"  value='Enter your phone number' onFocus=" if (this.value == 'Enter your phone number') { this.value = ''; }" onBlur="if (this.value == '') { this.value='Enter your phone number';} "  />

<div style="clear:both;"></div>

                <input class="sidebarform1"  type="text" name="email" value='Enter your email' onFocus=" if (this.value == 'Enter your email') { this.value = ''; }" onBlur="if (this.value == '') { this.value='Enter your email';} "  />

                <div style="clear:both;">

                  <div style="clear:both;"></div><textarea class="sidebarform2" name="Project details" cols="1" rows="7">Enter your message here...</textarea>

                <div style="clear:both; height: 0px;"></div>

              <div style="clear:both;"></div>

<div style="clear:both; height: 0px;"></div>

                <div align="right">

                <input type="image" value="Submit Your Info" style="color:#000;text-shadow: 0 1px 0 0 #fff;" class="sidebutton" border="0" value="Submit Your Info" />


                <div style="clear:both;"></div>


          </form>  </div>

              <!-- /ENDform -->


<p align="center" style="font-size:10px; font-color:#7c4616;">We promise to NOT share your info with anyone.</p>




Link to comment
Share on other sites

In the future, please place code inside



The form action is the page which the form will send its data to when someone submits it. Usually, this is the page which will process the form. It is possible that the theme already has functionality in place for that.


You would most likely put your email on the page that processes the form, so that it can be emailed out. Again, the theme might already handle this.

Link to comment
Share on other sites

Your email address must never be in the form - otherwise someone can hijack your form to send spam to other people, just by sending their email address in place of yours.  The email address will be stored somewhere else (on the page that processes the form, as scootstah says)


I can't help with the action unfortunately as I'm not familiar with Wordpress.  But I would assume you don't need to change it from whatever it was before you started customizing..

Link to comment
Share on other sites

This thread is more than a year old. Are you sure you have something important to add to it?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.