Skip to main content
RobertLukow
New Member
December 1, 2023
Solved

Default country prefix, how to change it to one of my choice

  • December 1, 2023
  • 3 replies
  • 2797 views

Hi Team,

 

When the user registers his account on the portal, he must select a prefix for the phone number. The question is how to set my country to be my favorite or by default will be chosen. The current default setting is +1 and I don't know how to change it. To clarify the question, how to change it so that the +48 prefix is always shown to each user. I traied change that in html code, but i failed. I searched the forum but didn't find anything.

A request for help

 

Fortiauthenticator 6.5.3

 

 

2023-12-01 14_46_28-Guest Internet - OneNote.png

Best answer by RobertLukow

Okay, I did itMy mistake is that I tried to enter numbers (+48) and I had to enter the country letters (PL)

 

If anyone else needs this information, it can be done in the html code in the Authentication/Portals/Replacement Messages and then you chose your portal. The variable in the html code that by default looks like this: data-top-countries="", we enter our country between quotation marks: data-top-countries="PL" and this way, each user will always have our country selected during registration.

 

The entire html code for get the phone number from user, looks like this:

<input class="form-control intl-phone-input" id="id_intl_phone_{{:mobile_number}}" name="intl_phone_{{:mobile_number}}" data-top-countries="PL" data-field-id="id_mobile_number" data-field-name="{{:mobile_number}}" type="tel" value="{{:mobile_number_val}}" />

3 replies

distillednetwork
Explorer II
December 1, 2023

not sure the type of portal you are using or the exact configuration, but have you looked at the replacement messages section?  There maybe a default defined in there you could change.

RobertLukow
RobertLukowAuthorAnswer
New Member
December 4, 2023

Okay, I did itMy mistake is that I tried to enter numbers (+48) and I had to enter the country letters (PL)

 

If anyone else needs this information, it can be done in the html code in the Authentication/Portals/Replacement Messages and then you chose your portal. The variable in the html code that by default looks like this: data-top-countries="", we enter our country between quotation marks: data-top-countries="PL" and this way, each user will always have our country selected during registration.

 

The entire html code for get the phone number from user, looks like this:

<input class="form-control intl-phone-input" id="id_intl_phone_{{:mobile_number}}" name="intl_phone_{{:mobile_number}}" data-top-countries="PL" data-field-id="id_mobile_number" data-field-name="{{:mobile_number}}" type="tel" value="{{:mobile_number_val}}" />

Roger_N
New Member
August 29, 2024

Hi

 

I've tried the above but the "data-top-countries" doesn't seem to change the countries. Is that the correct variable or is there another?