jerseyjoe Posted July 13, 2005 Share Posted July 13, 2005 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? Quote Link to comment Share on other sites More sharing options...
Guest Posted July 13, 2005 Share Posted July 13, 2005 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. Quote Link to comment Share on other sites More sharing options...
jerseyjoe Posted July 14, 2005 Author Share Posted July 14, 2005 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 Quote Link to comment Share on other sites More sharing options...
kinetic Posted July 16, 2005 Share Posted July 16, 2005 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: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.