Page 1 of 4 123 ... LastLast
Results 1 to 10 of 259

Hybrid View

  1. #1
    Join Date
    Jun 2004
    Posts
    54
    Plugin Contributions
    0

    Default

    yikes!

  2. #2
    Join Date
    Feb 2007
    Posts
    212
    Plugin Contributions
    0

    Default Re: custom forms - data collection

    Quote Originally Posted by DrByte View Post
    The contact us form consists of the following files:

    This one handles the layout, including all the fields you want to collect info for.
    I'd take out the "SEND_TO_TEXT" one, and set the default like you do in your regular email form.
    Then everything from "ENTRY_NAME" down to "ENTRY_ENQUIRY" would get replaced with your form.

    This file checks for logic, errors, etc, and if OK, sends the message off to you, by joining all the fields together into the $message variable. It reads info from the form as $_POST['variable'] names.

    This contains the display-text variables to be put into your template.

    Hi, iv done the above...(want to add the field 'book title')

    1. On the contact us page it does not display book title?? why is that?

    2.the message sends. But in the email i only recieve the name, email, message..no book title??


    3. Ohh yeh what do you mean by take out the SEND_TO_TEXT??

    What am i doing wrong?

    http://unikids.splay.co.uk/zencart/i...age=contact_us

  3. #3
    Join Date
    Feb 2007
    Posts
    212
    Plugin Contributions
    0

    Default Re: custom forms - data collection

    this is part of my header file:

    $error = false;
    if (isset($_GET['action']) && ($_GET['action'] == 'send')) {
    $name = zen_db_prepare_input($_POST['contactname']);
    $booktitle = zen_db_prepare_input($_POST['booktitle']);
    $email_address = zen_db_prepare_input($_POST['email']);
    $enquiry = zen_db_prepare_input(strip_tags($_POST['enquiry']));

    $zc_validate_email = zen_validate_email($email_address);

    if ($zc_validate_email and !empty($enquiry) and !empty($name)) {
    // auto complete when logged in
    if($_SESSION['customer_id']) {
    $sql = "SELECT customers_id, customers_firstname, customers_lastname, customers_password, customers_email_address, customers_default_address_id
    FROM " . TABLE_CUSTOMERS . "
    WHERE customers_id = :customersID";

    $sql = $db->bindVars($sql, ':customersID', $_SESSION['customer_id'], 'integer');
    $check_customer = $db->Execute($sql);
    $customer_email= $check_customer->fields['customers_email_address'];
    $customer_booktitle= $check_customer->fields['customers_booktitle'];
    $customer_name= $check_customer->fields['customers_firstname'] . ' ' . $check_customer->fields['customers_lastname'];
    } else {
    $customer_email='Not logged in';
    $customer_name='Not logged in';

    Do i need to add anything here???

    ---------------------------

    part of my contact us page:


    define('ENTRY_NAME', 'Full Name:');
    define('ENTRY_BOOKTITLE', 'Book Title:');
    define('ENTRY_EMAIL', 'Email Address:');

    define('ENTRY_ENQUIRY', 'Message:');



    ----------------------


    part of my tpl_contact_us_default

    <?php
    // show dropdown if set
    if (CONTACT_US_LIST !=''){
    ?>
    <label class="inputLabel" for="send-to"><?php echo SEND_TO_TEXT; ?></label>
    <?php echo zen_draw_pull_down_menu('send_to', $send_to_array, 0, 'id="send-to"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?>
    <br class="clearBoth" />
    <?php
    }
    ?>

    <label class="inputLabel" for="contactname"><?php echo ENTRY_NAME; ?></label>
    <?php echo zen_draw_input_field('contactname', $name, ' size="40" id="contactname"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?>
    <br class="clearBoth" />

    <label class="inputLabel" for="email-address"><?php echo ENTRY_EMAIL; ?></label>
    <?php echo zen_draw_input_field('email', ($error ? $_POST['email'] : $email), ' size="40" id="email-address"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?>
    <br class="clearBoth" />

    <label class="inputLabel" for="booktitle"><?php echo ENTRY_BOOKTITLE; ?></label>
    <?php echo zen_draw_input_field('booktitle', $name, ' size="40" id="booktitle"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?>
    <br class="clearBoth" />

    <label for="enquiry"><?php echo ENTRY_ENQUIRY . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?></label>
    <?php echo zen_draw_textarea_field('enquiry', '30', '7', '', 'id="enquiry"'); ?>

    </fieldset>



    REGARDS

    VIK

  4. #4
    Join Date
    Feb 2007
    Posts
    212
    Plugin Contributions
    0

    Default Re: custom forms - data collection

    Hi guys...ignore my previous two requests.


    i have now basically created a new pop up window on the account default page.

    So when they click sell a new window opens which is fine...

    iv been through the start of this thread..but do not understand?!?

    could you please guide me the correct way so that when a new window is opened a form is dispalyed which can be emailed to me:

    form should consist of:

    Name, email, book title, ISBN, autour etc

    thanxs

  5. #5
    Join Date
    May 2006
    Posts
    313
    Plugin Contributions
    0

    Default Re: custom forms - data collection

    If anyone has experience with this process could help...?

    I'm close! Using the band signup demo, I've got the fields to show up. and the submit button to send the email.

    The email shows up with the correct subject, from, and to. Except: it is HTML (which I don't really care about), but the body only says: $EMAIL_MESSAGE_HTML

    Anyone have any ideas?

    Thanks very much in advance...

  6. #6
    Join Date
    May 2006
    Posts
    313
    Plugin Contributions
    0

    Default Re: custom forms - data collection

    Okay, so I made some progress....

    How do i tell the email to be in text format only. If I switch my global setting to text only, it works perfect.

    I would like to keep my global setting to HTML. But allow this email response to be in text....

  7. #7
    Join Date
    May 2006
    Posts
    313
    Plugin Contributions
    0

    Default Re: custom forms - data collection

    Well, I found the easiest way for me was to duplicate all contact_us related files and rebuild from there...

    seemed to work really well.



    if someone else needs more help, feel free to pm me.

  8. #8
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: custom forms - data collection

    Here's a packaged version of the module, designed for v1.3.7 ... tested on v1.3.7.

    Please consider a donation to the Zen Cart team if you find it useful, as there are numerous hours invested in upgrading and writing and testing this form.
    Attached Files Attached Files
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  9. #9
    Join Date
    Oct 2007
    Posts
    8
    Plugin Contributions
    0

    Default Re: custom forms - data collection

    There's an error in the packaged module, in the file "tpl_band_signup_default.php".

    The first "<div" tag doesn't appear to be closed.


    <div class="centerColumn" id="bandSignupDefault">

    <h1 id="bandSignupDefaultHeading"><?php echo HEADING_TITLE; ?></h1>

    <?php if ($messageStack->size('band_signup') > 0) echo $messageStack->output('band_signup'); ?>

  10. #10
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: custom forms - data collection

    Right -- the initial div is closed at the end of the file after everything else in it is displayed.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 
Page 1 of 4 123 ... LastLast

Similar Threads

  1. custom survey forms
    By cpk in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 2 May 2011, 05:07 PM
  2. Custom Forms
    By wwiii in forum General Questions
    Replies: 3
    Last Post: 11 May 2009, 05:51 PM
  3. Customer's seeing other users' data in forms
    By erikcw in forum General Questions
    Replies: 5
    Last Post: 30 Jan 2008, 11:30 PM
  4. Custom Collection of Attribute Data
    By Fastcar in forum General Questions
    Replies: 0
    Last Post: 15 Jan 2008, 01:01 PM
  5. Custom Forms - Help?
    By TurtleDove in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 9 Jun 2006, 02:46 AM

Posting Permissions

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