Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2012
    Posts
    9
    Plugin Contributions
    0

    Default Error when I add a checkbox to registration

    Hi, I need to add a checkbox to the registration form, so the customer can confirm whether they are VAT exempt or not. This is for a disability website and products are VAT exempt only if they are disabled. I have added text boxes with no problems. And yes all these fields have been added to the mysql table.

    I edited customers.php tpl_modules_create_account.php and create_account.php

    All the fields display correctly apart from the last checkbox which is what I added.

    It appears as the checkbox then ENTRY_VATEXEMPTCONFIRMENTRY_VATEXEMPTCONFIRM_TEXT

    So it does not name the field properly, it also does not update the sql db table to say whether the box was checked or not.


    I think the error is here

    Code:
    <fieldset>
    
    <?php echo zen_draw_checkbox_field('vatexemptconfirm', '1', $vatexemptconfirm, 'id="vat-checkbox"') . '<label class="checkboxLabel" for="vat-checkbox">' . ENTRY_VATEXEMPTCONFIRM . '</label>' . (zen_not_null(ENTRY_VATEXEMPTCONFIRM_TEXT) ? '<span class="alert">' . ENTRY_VATEXEMPTCONFIRM_TEXT . '</span>': ''); ?>
    <br class="clearBoth" />
    
    </fieldset>
    on the tpl_modules_create_account.php page

    Please help.

  2. #2
    Join Date
    Dec 2006
    Location
    Seligman, MO U.S.A.
    Posts
    2,101
    Plugin Contributions
    5

    Default Re: Error when I add a checkbox to registration

    I realize that you want this done during the Account Creation, but it would be much easier to make this a required attribute during the checkout process................maybe?
    Teach them to shop and they will shop today;
    Teach them to Zen and they will OWN a shop tomorrow!

  3. #3
    Join Date
    Jun 2012
    Posts
    9
    Plugin Contributions
    0

    Default Re: Error when I add a checkbox to registration

    I did think about that, but in the registration process I have included a legal form to say the customer is vat exempt and that is where I need the checkbox.

    Then in the checkout process, I will do a database query to check to see if checkbox is checked. If so the prices without vat are shown, if not then vat is included.

    All I really need help with is getting the checkbox and labels to display correctly and for the database to record whether the box was checked or not.

 

 

Similar Threads

  1. Replies: 6
    Last Post: 21 Oct 2014, 09:27 PM
  2. Replies: 3
    Last Post: 28 Aug 2012, 07:31 AM
  3. Phone number error when trying a test registration
    By Shawn_nwahS in forum Managing Customers and Orders
    Replies: 4
    Last Post: 10 Jun 2009, 01:33 AM
  4. Replies: 2
    Last Post: 9 Jan 2009, 12:33 PM
  5. adding checkbox in the registration
    By tme in forum General Questions
    Replies: 3
    Last Post: 14 Jan 2007, 09:37 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