treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Form Action HELP!

  • Hey all,

    I just recently put up this site http://www.bigfootcanoerental.com/ a wordpress based site. I need to have the content form and the reservation form send all the information that is inputed by the user to send an e-mail in a nice clear format to my client.

    I know I have to put something in the "action" part of the code and maybe something in the cgi-bin to make this work <form action="#" method="post">

    The two page links are: http://www.bigfootcanoerental.com/contact/ and http://www.bigfootcanoerental.com/reservations/

    Any suggestions or help is greatly appreciated!

    Nick
  • It may be simpler if you use a Wordpress plugin to handle your contact forms. For example: http://wordpress.org/extend/plugins/contact-form-7/

    Should save you the hassle of writing all of the code to process the form and send it yourself.
  • action just refers to "what page will i load when you hit submit"

    It is sometimes it self, some times it targets a another script

    action="" will post your form to it's self and at the top of your page you would write something like


    if(isset($_POST))
    {
    $name = $_POST['name'];
    ect....
    }


    This will run the code if some one clicks on submit....
  • "falkencreative" said:
    It may be simpler if you use a Wordpress plugin to handle your contact forms. For example: http://wordpress.org/extend/plugins/contact-form-7/

    Should save you the hassle of writing all of the code to process the form and send it yourself.



    Can I use this with the existing code that I have set up for the form already and use the plug-in? I apologize, I'm not good with forms. WPCoder created this form page for me.

    Thanks!
  • If I understand correctly, you will have to rebuild the form using the WP Plugin within the confines of WP, and then you'd have to go in and style it to look the way it looks right now.
  • "xheathen" said:
    If I understand correctly, you will have to rebuild the form using the WP Plugin within the confines of WP, and then you'd have to go in and style it to look the way it looks right now.



    Is there anyway I can do it with the existing code thats already there?
  • have you got an action script??? like contact.php

    the action="contact.php" just set it all in motion, for example my action calls this exact thing, so it start the contact.php script and this is where the magic happens