Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trying to create a custom contact form
#1
We decided we wanted a "fancy" dropdown box on a GS site that lets you make three choices. I used Chris Cagle's tutorial on the contact.php template to modify the Subject from an input field to a dropdown box. I also added another input field for Phone. Looks fine on the site. The new contact page is at http://guswortham.info/contact/ ...

And here's the code from my new contact-custom.php template:

Code:
<form action="<?php get_page_url(); ?>" method="post" class="contactform" >
                    <?php set_contact_page(); ?>
                    <div><b>Name:</b> <input class="text" type="text" value="<?php print($_POST['contact']['name']); ?>" name="contact[name]" /></div>
                    <div><b>Email:</b> <input class="text" type="text" value="<?php print($_POST['contact']['email']); ?>" name="contact[email]" /></div>
                    <div><b>Phone:</b> <input class="text" type="text" value="<?php print($_POST['contact']['phone']); ?>" name="contact[phone]" /></div>
                    <div><b>Subject?</b> <select name="subject" value="<?php print($_POST['contact']['subject']); ?>" name="contact[subject]" />
                        <option>Choose One:</option>
                        <option>Request More Information</option>
                        <option>Volunteer to Help the Conservancy</option>
                        <option>Report Site Problem</option>
                        <option>Other</option></select></div>
                    <div><b>Message:</b> <textarea class="text" name="contact[body]" ><?php print($_POST['contact']['body']); ?></textarea></div>
                    <div class="pot" ><input class="text" type="text" value="" name="contact[pot]" /></div>
                    <div><input type="submit" value="Send Email" id="contact-submit" name="contact-submit" /></div>
                </form>

And here's what GS mailed back to me. Notice that it's parsing Name, Phone and Body just fine. What's missing is Email and Subject.

Code:
Contact Form Submission from http://guswortham.info//contact
-----------------------------------
Name: Joni Mueller
Phone: 713.92x.xxxx
Body: testing custom contact form at guswortham.info


Maybe I'm just tired and need more coffee. I can't see anything wrong with my code. Thanks for any help.
Pixelita Designs
http://www.pixelita.com
Visit Serbia's biggest and best internet forum!
http://www.burek.com
Reply
#2
I tracked down why the subject isnt working, but the from is going to take a little more time.
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply
#3
Hmm. Not sure what you mean. It got "Phone" right, which is one that I added, along with changing Subject from an input field to a dropdown box. It didn't parse Email either, which is from the original code. Weird.
Pixelita Designs
http://www.pixelita.com
Visit Serbia's biggest and best internet forum!
http://www.burek.com
Reply




Users browsing this thread: 1 Guest(s)