Forums / Templates, Stylesheets, Page Layout / Error when I add a checkbox to registration

Error when I add a checkbox to registration

Views: 771

Results 1 to 3 of 3
24 Jun 2012, 4:08 PM
#1
pwithers avatar

pwithers

New Zenner

Join Date:
Jun 2012
Posts:
9
Plugin Contributions:
0

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

<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.

24 Jun 2012, 5:05 PM
#2
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

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!

24 Jun 2012, 6:42 PM
#3
pwithers avatar

pwithers

New Zenner

Join Date:
Jun 2012
Posts:
9
Plugin Contributions:
0

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.