SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2010
    Location
    Co Durham UK
    Posts
    54
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Form data sending problem.

    Hi. can you please help me out?
    Im working on two forms within Wordpress. One sends information to an email address, the other sends information to the Wordpress Cpanel.
    Both work independent from each other and are on different pages within the actual site and both work fine.

    The first is a normal Contact form, the second however is a 'Quote Page' which, after you have filled in your details (IE car parts) sends them directly to the WP Cpanel, so the admin person can veiw them.

    My problem is Ive been asked if there is any way in which a notification email can be sent to the same address as the Contact form whenever a person requets a quote.

    Here are the two pieces of code

    Contact Code:

    <div class="form">


    <form enctype="multipart/form-data" action="<?php bloginfo('template_directory'); ?>/assets/php/mail.php" method="post" id="contactform" class="global">

    <div>
    <label for="full_name">Name</label>
    <input type="text" id="name" name="name" maxlength="75" value="" tabindex="1" />
    </div>

    <div>
    <label for="email">Email</label>
    <input type="text" id="email" name="email" maxlength="75" value="" tabindex="2" />
    </div>

    <div>
    <label for=""></label>
    <textarea id="message" name="message" rows="8" cols="8" tabindex="3"></textarea>
    </div>

    <div>
    <input type="submit" name="submit" value="Send" id="submit">
    <input type="hidden" name="c_email" id="c_email" value="<?php echo stripslashes(get_option('cd_email_id')); ?>" />
    </div>

    <div class="errorbox"></div>

    </form>


    </div>



    Quote Request Code:

    <div class="form">
    <form enctype="multipart/form-data" action="<?php bloginfo('template_directory'); ?>/assets/php/mail.php" method="post" id="contactform" class="global">





    <div class="one_half">

    <div>
    <label for="full_name">Full Name</label>
    <input type="text" name="full_name" value="" id="full_name">
    </div>

    <div>
    <label for="phone_number">Phone Number</label>
    <input type="text" name="phone_number" value="" id="phone_number">
    </div>

    <div>
    <label for="email">Email</label>
    <input type="text" name="email" value="" id="email">
    </div>

    </div>

    <div class="one_half_last">

    <div>
    <label for="models">Model</label>
    <?php
    $carsModelPage=get_option('cd_car_listing_page');
    $args = array(
    'depth' => 1,
    'sort_column' => 'menu_order',
    'child_of' => lp_get_page_id(''.$carsModelPage.''),
    );
    wp_dropdown_pages($args);
    ?>
    </div>

    <div>
    <label for="type">Type</label>
    <select name="type" id="type">
    <option value="new">New</option>
    <option value="pre-owned">Pre-owned</option>
    </select>
    </div>

    </div>



    <div>
    <label for=""></label>
    <textarea name="message" rows="8" cols="8">Please include any other information or question here.</textarea>
    </div>

    <div>
    <input type="submit" name="submit" value="Send" id="submit">
    <input type="hidden" name="c_email" id="c_email" value="<?php echo stripslashes(get_option('cd_email_id')); ?>" />
    </div>

    </form>

    </div>


    I know the issue is surrounding the piece beginning with
    $carsModelPage=get_option('cd_car_listing_page');
    but Im lost as to what to do next.

    I hope Ive explained myself properly.

    Any suggestions would be most helpful.
    Thanks, Alan

  2. #2
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,748
    Mentioned
    73 Post(s)
    Tagged
    0 Thread(s)
    the key to what you want will be inside mail.php.... without seeing that, I cant offer any specific advice.
    Never grow up. The instant you do, you lose all ability to imagine great things, for fear of reality crashing in.

  3. #3
    SitePoint Member apxred's Avatar
    Join Date
    Jul 2012
    Location
    India
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Since, you are using Wordpress... Check Secure Contact Form Plugin, it gives a lot of options for what you want + additional facility to send a mail also to the administrator of the website..

    hope it solves the problem.

  4. #4
    SitePoint Enthusiast
    Join Date
    Dec 2010
    Location
    Co Durham UK
    Posts
    54
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by StarLion View Post
    the key to what you want will be inside mail.php.... without seeing that, I cant offer any specific advice.
    StarLion. I dont have the guys actual hosting details to view the mail.php. Ill get in touch with him. Thanks.

  5. #5
    SitePoint Enthusiast
    Join Date
    Dec 2010
    Location
    Co Durham UK
    Posts
    54
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by apxred View Post
    Since, you are using Wordpress... Check Secure Contact Form Plugin, it gives a lot of options for what you want + additional facility to send a mail also to the administrator of the website..

    hope it solves the problem.
    Thanks for that apxred. Ill give it a go.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •