Jump to content

Disable required phone number on the Registration Form


Recommended Posts

You can change this in the required fields for the address in the 

Back Office > Localization > Countries > Edit the country in which you need it

If you have customer from other countries, and if you need this also, you will need change it for each country.

Link to comment
Share on other sites

You can change this in the required fields for the address in the 

Back Office > Localization > Countries > Edit the country in which you need it

If you have customer from other countries, and if you need this also, you will need change it for each country.

 

Cotoko,

 

I was able to find them in the country  but I can only see where I can delete it. We just would like to disable required field Not to delete.

Edited by natebc (see edit history)
Link to comment
Share on other sites

Cotoko,

 

I was able to find them in the country  but I can only see where I can delete it. We just would like to disable required field Not to delete.

You can comment this blocks of code in the file: /themes/default-bootstrap/authentication.tpl

<div class="{if isset($one_phone_at_least) && $one_phone_at_least}required {/if}form-group">
	<label for="phone_mobile">{l s='Mobile phone'}{if isset($one_phone_at_least) && $one_phone_at_least} <sup>*</sup>{/if}</label>
	<input type="text" class="form-control" name="phone_mobile" id="phone_mobile" value="{if isset($smarty.post.phone_mobile)}{$smarty.post.phone_mobile}{/if}" />
</div>
<div class="form-group is_customer_param">
	<label for="phone_invoice">{l s='Home phone'}</label>
	<input type="text" class="form-control" name="phone_invoice" id="phone_invoice" value="{if isset($guestInformations) && $guestInformations.phone_invoice}{$guestInformations.phone_invoice}{/if}" />
</div>
<div class="{if isset($one_phone_at_least) && $one_phone_at_least}required {/if}form-group">
	<label for="phone_mobile_invoice">{l s='Mobile phone'}{if isset($one_phone_at_least) && $one_phone_at_least} <sup>*</sup>{/if}</label>
	<input type="text" class="form-control" name="phone_mobile_invoice" id="phone_mobile_invoice" value="{if isset($guestInformations) && $guestInformations.phone_mobile_invoice}{$guestInformations.phone_mobile_invoice}{/if}" />
</div>
<p class="form-group">
	<label for="phone">{l s='Home phone'}</label>
	<input type="text" class="form-control" name="phone" id="phone" value="{if isset($smarty.post.phone)}{$smarty.post.phone}{/if}" />
</p>
<p class="{if isset($one_phone_at_least) && $one_phone_at_least}required {/if}form-group">
	<label for="phone_mobile">{l s='Mobile phone'}{if isset($one_phone_at_least) && $one_phone_at_least} <sup>*</sup>{/if}</label>
	<input type="text" class="form-control" name="phone_mobile" id="phone_mobile" value="{if isset($smarty.post.phone_mobile)}{$smarty.post.phone_mobile}{/if}" />
</p>
Link to comment
Share on other sites

 

You can comment this blocks of code in the file: /themes/default-bootstrap/authentication.tpl

<div class="{if isset($one_phone_at_least) && $one_phone_at_least}required {/if}form-group">
	<label for="phone_mobile">{l s='Mobile phone'}{if isset($one_phone_at_least) && $one_phone_at_least} <sup>*</sup>{/if}</label>
	<input type="text" class="form-control" name="phone_mobile" id="phone_mobile" value="{if isset($smarty.post.phone_mobile)}{$smarty.post.phone_mobile}{/if}" />
</div>
<div class="form-group is_customer_param">
	<label for="phone_invoice">{l s='Home phone'}</label>
	<input type="text" class="form-control" name="phone_invoice" id="phone_invoice" value="{if isset($guestInformations) && $guestInformations.phone_invoice}{$guestInformations.phone_invoice}{/if}" />
</div>
<div class="{if isset($one_phone_at_least) && $one_phone_at_least}required {/if}form-group">
	<label for="phone_mobile_invoice">{l s='Mobile phone'}{if isset($one_phone_at_least) && $one_phone_at_least} <sup>*</sup>{/if}</label>
	<input type="text" class="form-control" name="phone_mobile_invoice" id="phone_mobile_invoice" value="{if isset($guestInformations) && $guestInformations.phone_mobile_invoice}{$guestInformations.phone_mobile_invoice}{/if}" />
</div>
<p class="form-group">
	<label for="phone">{l s='Home phone'}</label>
	<input type="text" class="form-control" name="phone" id="phone" value="{if isset($smarty.post.phone)}{$smarty.post.phone}{/if}" />
</p>
<p class="{if isset($one_phone_at_least) && $one_phone_at_least}required {/if}form-group">
	<label for="phone_mobile">{l s='Mobile phone'}{if isset($one_phone_at_least) && $one_phone_at_least} <sup>*</sup>{/if}</label>
	<input type="text" class="form-control" name="phone_mobile" id="phone_mobile" value="{if isset($smarty.post.phone_mobile)}{$smarty.post.phone_mobile}{/if}" />
</p>

 

 

Thanks Cotoko, I was able to find the file but, What do I change (required)  too? I would like to let our costumer enter there phone number if they would like.

 

Natebc

Edited by natebc (see edit history)
Link to comment
Share on other sites

I don't understand, in your title you are requesting help to disable the required field, right?, my first reply was how to do that exactly, then you said you need delete it, so, what do you need exactly?

 

If you need keep the fields (phone and mobile phone) but don't force the customer to fill it, with my first reply you can achieve that.

Link to comment
Share on other sites

 

 

I don't understand, in your title you are requesting help to disable the required field, right?, my first reply was how to do that exactly, then you said you need delete it, so, what do you need exactly?
 
If you need keep the fields (phone and mobile phone) but don't force the customer to fill it, with my first reply you can achieve that.

 

 
Cotoko,
 
Sorry I should had sad that at the start. To keep the fields (phone and mobile phone) but yes don't force the customer to fill it out. When I went to Back Office > Localization > Countries > and delete the Phone and Mobile phone under "Address format" and "Required fields for the address (click for more details)". But after that the the "Mobile phone** " still stays and it still ask to fill it out.
 
Natebc
Edited by natebc (see edit history)
Link to comment
Share on other sites

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