Site maintenance: Sun 15 Nov, from 20:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / Templates, Stylesheets, Page Layout / I want to make my new registration field mandatory

I want to make my new registration field mandatory

Started by jbcholdings on 7 Feb 2010, 6:13 PM · Views: 1,476

Results 1 to 7 of 7
7 Feb 2010, 6:13 PM
#1
jbcholdings avatar

jbcholdings

New Zenner

Join Date:
Jul 2009
Posts:
32
Plugin Contributions:
0

I want to make my new registration field mandatory

Did some searches didn't find a quick road map to what I needed to do, I have added a new field to my customer registration page per the instructions here...thanks!

Now I need to make this field mandatory with either the jScript check or at the very least add the "*" next to it...

Any advice on a quick modification for this in my template's "create_account" would be great.

Thanks!

http://www.xbox360outlet.com <--nopCommerce 1.9

8 Feb 2010, 12:56 PM
#2
scott_c avatar

scott_c

Zen Follower

Join Date:
Dec 2009
Posts:
236
Plugin Contributions:
0

Re: I want to make my new registration field mandatory

Hi, Ive gone the reverse to you in the past but making some field NOT mandatory. To do that, I edited this file;

Includes/modules/pages/create_account/jscript_form_check.php

I imagine you'll have to add in the name of your new field to this file.

(Not 100% sure though as I havent tried it myself.)

Donation made. Enjoy those donuts! :-)

13 Feb 2010, 8:18 PM
#3
jbcholdings avatar

jbcholdings

New Zenner

Join Date:
Jul 2009
Posts:
32
Plugin Contributions:
0

Re: I want to make my new registration field mandatory

Scott_C:

Hi, Ive gone the reverse to you in the past but making some field NOT mandatory. To do that, I edited this file;

Includes/modules/pages/create_account/jscript_form_check.php

I imagine you'll have to add in the name of your new field to this file.

(Not 100% sure though as I havent tried it myself.)

hi Scott-

I took a shot at this, my field is called: "taxid"

So I added:

<?php if ((int)ENTRY_TAXID_MIN_LENGTH > 0) { ?>
  check_input("taxid", <?php echo ENTRY_TAXID_MIN_LENGTH; ?>, "<?php echo ENTRY_TAXID_NUMBER_ERROR; ?>");
<?php } ?>

No error fired when I created an account though, I just need something, anything to be entered in the taxid field.

I'd also like to add the red * next to the box.

Any help would be appreciated!

Thanks

http://www.xbox360outlet.com <--nopCommerce 1.9

14 Feb 2010, 12:31 AM
#4
scott_c avatar

scott_c

Zen Follower

Join Date:
Dec 2009
Posts:
236
Plugin Contributions:
0

Re: I want to make my new registration field mandatory

Hi, you need to add;

<span class="alert">THIS BIT IS RED</span>

So for an asterisk;

<span class="alert">*</span>

Donation made. Enjoy those donuts! :-)

3 Jun 2011, 8:44 AM
#5
derek_bryant avatar

derek_bryant

Zen Follower

Join Date:
Jul 2008
Location:
Bristol UK
Posts:
162
Plugin Contributions:
0

Re: I want to make my new registration field mandatory

Hi

I'm running v1.3.9h

I have changed the company name minimum field length greater than 0 which makes it mandatory.

How do I get the red asterisk to show next to the entry box the same as other compulsory fields on sign up?

thanks

Derek

3 Jun 2011, 1:55 PM
#6
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,137
Plugin Contributions:
56

Re: I want to make my new registration field mandatory

/includes/languages/YOUR_TEMPLATE/english.php, change:

  define('ENTRY_COMPANY_TEXT', '');

to

  define('ENTRY_COMPANY_TEXT', '*');
3 Jun 2011, 7:10 PM
#7
derek_bryant avatar

derek_bryant

Zen Follower

Join Date:
Jul 2008
Location:
Bristol UK
Posts:
162
Plugin Contributions:
0

Re: I want to make my new registration field mandatory

Hi - thanks for your response - these are the only files I can find in the admin area

/includes/languages/english.php

Line #238 : define('ENTRY_COMPANY', 'Company name:');

Line #239 : define('ENTRY_COMPANY_ERROR', '');

thanks

derek