Forums / Templates, Stylesheets, Page Layout / New Custom detail field needs to req'd

New Custom detail field needs to req'd

Locked

Views: 750

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
16 Mar 2009, 1:22 PM
#1
kiwi1066 avatar

kiwi1066

New Zenner

Join Date:
Jan 2009
Posts:
28
Plugin Contributions:
0

New Custom detail field needs to req'd

Hi, I have worked my through this thread that has instructions about adding a new field to the Customer detail form

The field I added is for the customer to provide thier website address. This is required for my process to work.

I have hunted through the Forum and can find many examples about removing required status for exisitng customer details. :lookaroun

The field is on the form, the astrick has been added, the field is in the Admin>Customer details.

All is good except I can't see how to make this field required when the customer registers.

I am using ZC 1.38a
Fresh install with Blank sidebox mod

Can some direct me to a solution: :smile:

16 Mar 2009, 1:55 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: New Custom detail field needs to req'd

Look to the other required entries like first name in tpl_modules_create_account.php

<label class="inputLabel" for="firstname">
<?php echo ENTRY_FIRST_NAME; ?></label>
<?php echo zen_draw_input_field('firstname', '',
zen_set_field_length(TABLE_CUSTOMERS, 'customers_firstname',
 '40') . ' id="firstname"') . 
(zen_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="alert">'
 . ENTRY_FIRST_NAME_TEXT . '</span>': ''); ?>

Zen-Venom Get Bitten

17 Mar 2009, 9:59 PM
#3
kiwi1066 avatar

kiwi1066

New Zenner

Join Date:
Jan 2009
Posts:
28
Plugin Contributions:
0

Re: New Custom detail field needs to req'd

Hi Kobra

Thanks for the info. I have checked the file and bit for my website field looks like

<label class="inputLabel" for="website"><?php echo
 ENTRY_WEBSITE; ?></label>
<?php echo zen_draw_input_field('website', $account->
fields['customers_website'], zen_set_field_length
(TABLE_CUSTOMERS, 'customers_website', '55'). 
'id="website"') . (zen_not_null(ENTRY_WEBSITE_TEXT) ?
 '<span class="alert">' . ENTRY_WEBSITE_TEXT . '
</span>': ''); ?>

Is this right, do i understand that by having 'zen_not_null' should mean that some text needs to be entered in this field?:unsure:

17 Mar 2009, 10:04 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: New Custom detail field needs to req'd

Basically Yes, but try using the developers tool kit and searching for "ENTRY_FIRST_NAME_TEXT" to see the many files where you might need to add your custom field for full function

Zen-Venom Get Bitten