Jump to content

Registration Page - How to make a non required field REQUIRED


robkwal

Recommended Posts

http://www.prestashop.com/forums/viewthread/27333/general_discussion/mobile_phone_number_is_a_must_during_registration

You need to modify line 80 of classes/Address.php. Change it from:
protected $fieldsRequired = array('id_country', 'alias', 'lastname', 'firstname', 'address1', 'postcode', 'city');

to:

protected $fieldsRequired = array('id_country', 'alias', 'lastname', 'firstname', 'address1', 'postcode', 'city', 'phone_mobile');


You then need to find each line like the following in address.tpl and authentication.tpl:

<input type="text" id="phone_mobile" name="phone_mobile" value="{if isset($smarty.post.phone_mobile)}{$smarty.post.phone_mobile}{else}{$address->phone_mobile|escape:'htmlall':'UTF-8'}{/if}" />

then add the following after:

*


to add a red star after the mobile text fields so the user knows they are required.

Hi did this modification, working well. However the little * is grey instead of red…

You also need to change this :



into :



in the address.tpl and authentication.tpl files

Link to comment
Share on other sites

  • 9 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...