Zen Cart Logo
Forums / Managing Customers and Orders / trouble with making birthdates non-required

trouble with making birthdates non-required

Locked

Views: 900

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
7 Apr 2010, 1:27 AM
#1
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

trouble with making birthdates non-required

Hi -

I'm trying to make the birthdate an optional field for account creation. I set Configuration->Customer Details->Date of Birth to "true," and per the instructions in the activation panel, I set Config->Minimum Values->Date of Birth to blank. (I tried both blank and 0.)

The field still appears mandatory in registration. What am I doing wrong?

https://www.cinderellaantiques.com

Thanks.

7 Apr 2010, 1:55 AM
#2
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,179
Plugin Contributions:
0

Re: trouble with making birthdates non-required

mzimmers:

Hi -

I'm trying to make the birthdate an optional field for account creation. I set Configuration->Customer Details->Date of Birth to "true," and per the instructions in the activation panel, I set Config->Minimum Values->Date of Birth to blank. (I tried both blank and 0.)

The field still appears mandatory in registration. What am I doing wrong?

www.cinderellaantiques.com

Thanks.

Mz,
To enable the customer to add the date of birth as optional, you just need to configure the DOB correctly ...

Go to the Configuration ... Customer Details ... and set to: true
> Date of Birth

Display date of birth field during account creation and with account information
NOTE: Set Minimum Value Date of Birth to blank for not required
Set Minimum Value Date of Birth > 0 to require
Now go the the Configuration ... Minimum Values ... and set to blank, not 0 but blank as in nothing in the input box, as instructed:
> Date of Birth
Minimum length of date of birth
Now the date of birth will display, but is not required ... :smile:

7 Apr 2010, 2:06 AM
#3
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: trouble with making birthdates non-required

OK, so what am I doing wrong here? (screen captures below)

7 Apr 2010, 9:47 AM
#4
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: trouble with making birthdates non-required

Your Date of Birth field is optional. To remove the asterisk and example (if you want) edit line 207 in english.php:

define('ENTRY_DATE_OF_BIRTH_TEXT', ' (eg. 05/21/1970)');*

7 Apr 2010, 2:43 PM
#5
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: trouble with making birthdates non-required

Well, I'll be danged. Thanks.

Edit: I bet there's no easy way to make that text non-red for that field only, is there?

7 Apr 2010, 2:50 PM
#6
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,179
Plugin Contributions:
0

Re: trouble with making birthdates non-required

Mz,
just remove the * and leave the single quotes

7 Apr 2010, 2:56 PM
#7
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: trouble with making birthdates non-required

Yup. Remove the red part (in tpl_modules_create_account.php)

<?php echo zen_draw_input_field('dob','', 'id="dob"') . (zen_not_null(ENTRY_DATE_OF_BIRTH_TEXT) ? '<span class="alert" >' . ENTRY_DATE_OF_BIRTH_TEXT . '</span>': ''); ?>
7 Apr 2010, 2:57 PM
#8
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: trouble with making birthdates non-required

Still red, but it's no big deal.

EDIT: this reply was to haredo; I haven't tried Steve's work yet.

Thanks.

7 Apr 2010, 3:27 PM
#9
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,179
Plugin Contributions:
0

Re: trouble with making birthdates non-required

mzimmers:

Still red, but it's no big deal.

EDIT: this reply was to haredo; I haven't tried Steve's work yet.

Thanks.

Mz,
includes/ languages/ your_template/ english.php

  1. line 202
  2. define('ENTRY_DATE_OF_BIRTH_TEXT', '* (eg. 05/21/1970)');
  3. change to this:
  4. define('ENTRY_DATE_OF_BIRTH_TEXT', '');