Results 1 to 10 of 259

Hybrid View

  1. #1
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: custom forms - data collection

    What a gem of a find!!! Got this working perfectly..

    I do have one question.. A little earlier in this thread there was a bit of discussion on making this for work with SSL.. The posted solution is not very clear.. Can anyone confirm if this for will work with SSL and/or how to make the band solution work with SSL.

    I'm wondering if accessing a form created using Dr Bytes solution via an EZ Page link (with SSL enabled) would be enough to do the trick??

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: custom forms - data collection

    To have the form process with SSL, you'd need to alter the zen_href_link parameters (I think it's the 3rd parameter that would need to be set to 'SSL') inside the zen_draw_form function call so that when the form's action parameter is produced it will contain the SSL URL instead. This will make the form be processed over SSL, regardless whether the URL in the browser is HTTPS or not.
    If you want the browser URL to contain HTTPS, then whatever links you have pointing to the page will have to be manually coded to be in HTTPS.
    .

    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.

  3. #3
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: custom forms - data collection

    Quote Originally Posted by DrByte View Post
    To have the form process with SSL, you'd need to alter the zen_href_link parameters (I think it's the 3rd parameter that would need to be set to 'SSL') inside the zen_draw_form function call so that when the form's action parameter is produced it will contain the SSL URL instead. This will make the form be processed over SSL, regardless whether the URL in the browser is HTTPS or not.
    If you want the browser URL to contain HTTPS, then whatever links you have pointing to the page will have to be manually coded to be in HTTPS.
    Thanks for the response. Hope you don't mind me imposing on your expertise for one more thing?? Could I ask you to grade my homework here??

    Is this the correct way to make this change?

    Code:
    <?php echo zen_draw_form('customer_questionnaire', zen_href_link(FILENAME_CUSTOMER_QUESTIONNAIRE, 'action=send', 'SSL')); ?>

  4. #4
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: custom forms - data collection

    Without going and actually studying the code, yes, that looks like it's probably correct.
    .

    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.

  5. #5
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: custom forms - data collection

    Quote Originally Posted by DrByte View Post
    Without going and actually studying the code, yes, that looks like it's probably correct.
    That's good enough for me! Just wanted to make sure that the syntax looked correct.. (I looked at the login form for a little guidance after reading you hint)

    Thanks again for the responses, and the awesome contribution!!! I hope the Zen Cart team enjoys the coffee I sent..

  6. #6
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: custom forms - data collection

    Thanks!
    .

    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.

  7. #7
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: custom forms - data collection

    If anyone is using the "CAPTCHA using TTF & GD" mod and wanted to add that CAPTCHA mod to the forms created from this mod here's down and dirty what I did:

    In the form you created located in "includes/templates/YOUR_TEMPLATE/templates" find this:
    Code:
    </fieldset>
    
    <div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_SEND, BUTTON_SEND_ALT); ?></div>
    Paste the following just above this
    Code:
    <?php
    // BOF Captcha
    if(is_object($captcha) && (!$_SESSION['customer_id'])) {
    ?>
    <br class="clearBoth" />
    <?php echo $captcha->img(); ?>&nbsp;
    <?php echo $captcha->redraw_button(BUTTON_IMAGE_CAPTCHA_REDRAW, BUTTON_IMAGE_CAPTCHA_REDRAW_ALT); ?>
    <br class="clearBoth" />
    <label for="captcha"><?php echo TITLE_CAPTCHA; ?></label>
    <?php echo $captcha->input_field('captcha', 'id="captcha"') . '&nbsp;<span class="alert">' . TEXT_CAPTCHA . '</span>'; ?>
    <br class="clearBoth" />
    <?php
    }
    // BOF Captcha
    ?>
    In your header_php.php located in "includes/modules/pages/YOUR_FORM" find this:
    Code:
      require(DIR_WS_MODULES . 'require_languages.php');
      $breadcrumb->add(NAVBAR_TITLE);
    Just below this add:
    Code:
    // BOF Captcha
    if(CAPTCHA_CONTACT_US != 'false') {
        require(DIR_WS_CLASSES . 'captcha.php');
        $captcha = new captcha();
    }
    // EOF Captcha
    Then find this:
    Code:
       if ($error == false) {
    
    // grab some customer info if logged in
          if(isset($_SESSION['customer_id'])) {
    And just above it paste this:
    Code:
    // BOF Captcha Validation
      if (is_object($captcha) && !$captcha->validateCaptchaCode()) {
        $error = true;
        $messageStack->add('customer_questionnaire', ERROR_CAPTCHA);
      }
    // EOF Captcha Validation
    I think this covers everything I did.. (Hopefully I didn't overlook anything) So far my testing shows this works just perfectly..

    Here's the source I used: http://www.zen-cart.com/forum/showpo...&postcount=284

    This post shows how to add the CAPTCHA to the Returns Authorization form, but it was pretty to adapt the instructions here to work with this form.. Hopefully someone else will find it useful too..

  8. #8
    Join Date
    Aug 2008
    Posts
    26
    Plugin Contributions
    0

    Default Re: custom forms - data collection

    Quote Originally Posted by DrByte View Post
    Thanks!
    Hi DrByte,

    I am looking for a module to conduct surveys, where the client meets a series of questions and answers can be analyzed in the admin area.

    Thanks

    Rolando Maldonado
    www.todoenguate.com

 

 

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