Jump to content

adding a contact form to Contact Us


jerseyjoe

Recommended Posts

I'm trying to avoid leaving the client's email address unavailable for spambots by channeling contacts through a server side form.

Please see:

http://www.wendycostastudio.com/store/inde...viewDoc&docId=2

You'll see a test form I've started but note that Submit does nothing.

The CC Site Docs editor offers a form maker but there doesn't seem to be any way to define how the form works - that is where the data should go via email.

Does anyone have script for a Contact Us form that will work on this page?

Link to comment
Share on other sites

Create a file called sendmail.php with this code in it.

<?

  $email = $_REQUEST['email'];

  $message = $_REQUEST['message'];



  mail( "[email protected]", "Feedback Form Results",

    $message, "From: $email" );

  header( "Location: PUT YOUR THANKYOU PAGE URL HERE" );

?>




and put in a directory on your site.



Creat a form with the action "http://www.yoursite.com/sendmail.php"



or just use this


<form method="post" action="sendmail.php">

  Email: <input name="email" type="text" /><br />

  Message:<br />

  <textarea name="message" rows="15" cols="40">

  </textarea><br />

  <input type="submit" />

</form>

Just edit any bits that have my details or yoursite.com in them to yours and it should work.

Link to comment
Share on other sites

Thanks for the response. I must hold off trying it out while waiting for CC Tech Support to address a weird bug (reported elsewhere) that is leaving "ghost" products on the store.

But I'm hoping they'll do that today so I can move on with the rest of the project.

Joe

Link to comment
Share on other sites

CUbeCart 3.0.1

OK thats fine and good but what if we want to have a form that if a User IS registered and IS logged in that our form displays their information already filled in on the contact form like email address, first name, last name, address, phone etc

adding values to the input fields like this

<input name="email" type="text" class="textbox" id="email" value="{VAL_EMAIL}" maxlength="100" />




doesnt work

or doing it as a include like so:
<input name="email" type="text" class="textbox" id="email" value="<?php include('$email'); ?>" maxlength="100" />

and if a user isnt logged in or registered displaying blank fields to fill out?

So whats the method for having a "SMART FORM"

Any Ideas??

KInetic aka Mr Eyecandy

:ninja:

Link to comment
Share on other sites

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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...