Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2014
    Location
    Corbin
    Posts
    2
    Plugin Contributions
    0

    Default How to add ID to zen_draw_form?

    Hi all,

    I am wondering how I can add an ID to a Zen Cart form. Here is the code for the form:

    <?php echo zen_draw_form('catalogForm', zen_href_link(FILENAME_CATALOG)); ?>

    When I view the source code of the page, I see that this code produces a <form> tag that includes name="catalogForm". I want to add id="catalogForm" as well.

    Thanks!

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    8,943
    Plugin Contributions
    71

    Default Re: How to add ID to zen_draw_form

    Code:
    <?php echo zen_draw_form('catalogForm', zen_href_link(FILENAME_CATALOG), 'post', 'id="catalogForm"'); ?>

  3. #3
    Join Date
    Nov 2014
    Location
    Corbin
    Posts
    2
    Plugin Contributions
    0

    Default Re: How to add ID to zen_draw_form

    Thank you lat9, that worked perfectly!

  4. #4
    Join Date
    Nov 2005
    Location
    Vancouver, Canada
    Posts
    150
    Plugin Contributions
    0

    Default Re: How to add ID to zen_draw_form

    Hello Lat9

    I tried adding an ID to my contact form, but when I send the form it just reloads the page with some of the fields filled out. the only difference between your example and mine is SSL and action=send. Here's my code:

    HTML Code:
    <?php 
    /** 
    * removing ID from form worked
    * readded ID, no go
    * changed ID from contact_form to contactForm, no go
    */
    ?>
    <?php echo zen_draw_form('contact_us', zen_href_link(FILENAME_CONTACT_US,'id="contactForm"', 'action=send', 'SSL')); ?>
    could you guide me? I'm using zc1.5.5
    KP

  5. #5
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    8,943
    Plugin Contributions
    71

    Default Re: How to add ID to zen_draw_form

    Quote Originally Posted by newagekat View Post
    Hello Lat9

    I tried adding an ID to my contact form, but when I send the form it just reloads the page with some of the fields filled out. the only difference between your example and mine is SSL and action=send. Here's my code:

    HTML Code:
    <?php 
    /** 
    * removing ID from form worked
    * readded ID, no go
    * changed ID from contact_form to contactForm, no go
    */
    ?>
    <?php echo zen_draw_form('contact_us', zen_href_link(FILENAME_CONTACT_US,'id="contactForm"', 'action=send', 'SSL')); ?>
    could you guide me? I'm using zc1.5.5
    Sure, try this instead:
    Code:
    <?php echo zen_draw_form('contact_us', zen_href_link(FILENAME_CONTACT_US, 'action=send', 'SSL'), 'post', 'id="contactForm"'); ?>

  6. #6
    Join Date
    Jul 2012
    Posts
    14,364
    Plugin Contributions
    17

    Default Re: How to add ID to zen_draw_form

    By the time I decided to go ahead and post the same solution as above (checking for response before doing so) it was already posted. :) deleted my original response.
    Last edited by mc12345678; 4 Sep 2019 at 07:51 PM.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  7. #7
    Join Date
    Nov 2005
    Location
    Vancouver, Canada
    Posts
    150
    Plugin Contributions
    0

    Default Re: How to add ID to zen_draw_form

    Thank you lat9 and MC12345678, this worked!

    MC12345678 i sent you a pm.
    KP

 

 

Similar Threads

  1. v150 zen_draw_form() - doesn't do anything?
    By nazca in forum General Questions
    Replies: 4
    Last Post: 23 Sep 2013, 09:12 PM
  2. zen_draw_form
    By swguy in forum Upgrading to 1.5.x
    Replies: 1
    Last Post: 16 Aug 2011, 09:39 AM
  3. Replies: 2
    Last Post: 31 Oct 2007, 10:00 PM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR