How to Add a Store Registration Form?

The Agile Store Locator plugin has a pro feature which is called Store Registration Form which allows users to register their store through the front-end page. [ASL_FORM] is the shortcode that adds a store registration form on the WordPress page.

Steps to Setup the Store Registration Form #

  1. Go to “pages” on WordPress and add a new page.
  2. Add the title of the page. For example, “ Store Form Store Locator”
  3. Paste the shortcode [ASL_FORM] on the page and press “Publish”
  4. Open the published page to access the Store Registration Form
Store Registration Form
Store Registration Form

How can Users Register a New Store? #

  1. On the Store Registration Form, fill in the new store information, address location, and any additional details.
  2. Press register after agreeing to the terms and conditions.
  3. If you have provided an email for notifications and checked the “Notifications”  box in ASL Setting, you get a notification about the addition of the new store
  4. Go to the “Manage Stores” tab and approve the newly added store by clicking the ”approve” button next to it
  5. The store will now appear in the store list in “Manage Stores” and on the map as well

 Pre-selecting a specific country on the Store Registration Form #

Users can also have a country pre-selected on the Store Registration Form, which can save you the trouble of continuously selecting the country from the dropdown menu when registering a new store.

To have a pre-selected country on the Store Registration Form, simply add the following shortcode on a new page:

[ASL_FORM default_country="223"]

In the above shortcode, the number 223 corresponds to the USA. To pre-select another country please use the corresponding country code provided below.

Redirecting to a specific page after registering a new store #

In case a user wants to be redirected to a different web page after registering a new store, they can do so by adding the below shortcode on the new page:

[ASL_FORM default_country="223" redirect="insert URL here"]

For example, the below shortcode will redirect the user to google.com and the pre-selected country will be the USA.

[ASL_FORM default_country="223" redirect="http://google.com"]

Remove the Google Maps #

Since version 4.8.12, the register form has a Google Map to pinpoint the location of the user by dragging the marker, in case you don’t need it, use this shortcode below.

[ASL_FORM default_country="223" map="0" redirect="insert URL here"]

List of Country codes #

CodeCountry NameCodeCountry Name
1Afghanistan124Luxembourg
2Albania125Macau
3Algeria126Macedonia
4American Samoa127Madagascar
5Andorra128Malawi
6Angola129Malaysia
7Anguilla130Maldives
8Antarctica131Mali
9Antigua and Barbuda132Malta
10Argentina133Marshall Islands
11Armenia134Martinique
12Aruba135Mauritania
13Australia136Mauritius
14Austria137Mayotte
15Azerbaijan138Mexico
16Bahamas139Micronesia
17Bahrain140Moldova
18Bangladesh141Monaco
19Barbados142Mongolia
20Belarus143Montserrat
21Belgium144Morocco
22Belize145Mozambique
23Benin146Myanmar
24Bermuda147Namibia
25Bhutan148Nauru
26Bolivia149Nepal
27Bosnia and Herzegovina150Netherlands
28Botswana151Netherlands Antilles
29Bouvet Island152New Caledonia
30Brazil153New Zealand
31British Indian Ocean Territory154Nicaragua
32Brunei Darussalam155Niger
33Bulgaria156Nigeria
34Burkina Faso157Niue
35Burundi158Norfolk Island
36Cambodia159Northern Mariana Islands
37Cameroon160Norway
38Canada161Oman
39Cape Verde162Pakistan
40Cayman Islands163Palau
41Central African Republic164Panama
42Chad165Papua New Guinea
43Chile166Paraguay
44China167Peru
45Christmas Island168Philippines
46Cocos (Keeling) Islands169Pitcairn
47Colombia170Poland
48Comoros171Portugal
49Congo172Puerto Rico
50Cook Islands173Qatar
51Costa Rica174Reunion
52Cote D’Ivoire175Romania
53Croatia176Russia
54Cuba177Rwanda
55Cyprus178Saint Kitts and Nevis
56Czech Republic179Saint Lucia
57Denmark180Saint Vincent and the Grenadines
58Djibouti181Samoa
59Dominica182San Marino
60Dominican Republic183Sao Tome and Principe
61East Timor184Saudi Arabia
62Ecuador185Senegal
63Egypt186Seychelles
64El Salvador187Sierra Leone
65Equatorial Guinea188Singapore
66Eritrea189Slovakia (Slovak Republic)
67Estonia190Slovenia
68Ethiopia191Solomon Islands
69Falkland Islands (Malvinas)192Somalia
70Faroe Islands193South Africa
71Fiji194South Georgia and the South Sandwich Islands
72Finland195Spain
73France196Sri Lanka
74France197St. Helena
75French Guiana198St. Pierre and Miquelon
76French Polynesia199Sudan
77French Southern Territories200Suriname
78Gabon201Svalbard and Jan Mayen Islands
79Gambia202Eswatini
80Georgia203Sweden
81Germany204Switzerland
82Ghana205Syrian Arab Republic
83Gibraltar206Taiwan
84Greece207Tajikistan
85Greenland208Tanzania
86Grenada209Thailand
87Guadeloupe210Togo
88Guam211Tokelau
89Guatemala212Tonga
90Guinea213Trinidad and Tobago
91Guinea-bissau214Tunisia
92Guyana215Turkey
93Haiti216Turkmenistan
94Heard and Mc Donald Islands217Turks and Caicos Islands
95Honduras218Tuvalu
96Hong Kong219Uganda
97Hungary220Ukraine
98Iceland221United Arab Emirates
99India222United Kingdom
100Indonesia223United States
101Iran224United States Minor Outlying Islands
102Iraq225Uruguay
103Ireland226Uzbekistan
104Israel227Vanuatu
105Italy228Vatican City State (Holy See)
106Jamaica229Venezuela
107Japan230Viet Nam
108Jordan231Virgin Islands (British)
109Kazakhstan232Virgin Islands (U.S.)
110Kenya233Wallis and Futuna Islands
111Kiribati234Western Sahara
112South Korea235Yemen
113North Korea236Serbia
114Kuwait237Zaire
115Kyrgyzstan238Zambia
116Laos239Zimbabwe
117Latvia240Montenegro
118Lebanon241Macedonia
119Lesotho242Curaçao
120Liberia243Palestine
121Libyan Arab Jamahiriya
122Liechtenstein
123Lithuania

Customization of Store Registration Form #

The store registration form in Agile Store Locator is highly customizable, allowing you to tailor it to your specific requirements. To add new fields to the form, follow these steps:

Accessing the Custom Field Manager #

To customize the store registration form in Agile Store Locator, start by accessing the Custom Field Manager section within the ASL Settings, newly created fields will appear in the form automatically.

Modifying the Registration Template File #

If you need to modify existing fields or their properties, navigate to the form file located at agile-store-locator/public/partials/asl-store-form.php and make the necessary changes, once you have done the changes, you can make a backup of the template to avoid getting overridden with the updates.

Implementing Field Validation #

Enhance the user experience and ensure data accuracy by adding validation to form fields. Simply include the required attribute in the HTML input elements of the desired fields.

required field store form

Remove Existing Fields #

While it’s possible to remove fields directly from the form, keep in mind that certain mandatory fields cannot be removed entirely. If you still need to proceed with removal, locate the respective HTML elements in the form file (asl-store-form.php) and delete the corresponding HTML code, for those fields you can use the d-none class to hide them.

hide field store register

Customizing the Store Registration Form #

Starting from version 4.10.11, Agile Store Locator allows users to customize the appearance of the store registration form using CSS variables. These variables let you easily change the typography, font size, colors, and other style elements, the following CSS rules can be add to the Appearance > Additional CSS.

Available CSS Variables #

Here are the CSS variables you can use to style the store registration form:

  • --sl-title-color: Sets the color of the title.
  • --sl-title-size: Sets the font size of the title.
  • --sl-subtitle-color: Sets the color of the subtitle.
  • --sl-subtitle-size: Sets the font size of the subtitle.
  • --sl-font-color: Sets the color of the form text.
  • --sl-font-size: Sets the font size of the form text.
  • --sl-label-color: Sets the color of the labels.
  • --sl-label-size: Sets the font size of the labels.
  • --sl-action-btn-font-size: Sets the font size of the action button text.
  • --sl-action-btn-color: Sets the color of the action button text.
  • --sl-action-btn-bg: Sets the background color of the action button.
  • --sl-action-btn-border: Sets the border color of the action button.
  • --sl-font-family: Sets the font family for the form.
  • --sl-map-height: Sets the height of the map.

Example Usage #

To apply these custom styles, add the following CSS rules to your stylesheet:

.asl-store-form {
  --sl-title-color: orange;
  --sl-title-size: 50px;

  --sl-subtitle-color: red;
  --sl-subtitle-size: 40px;

  --sl-font-color: pink;
  --sl-font-size: 15px;

  --sl-label-color: green;
  --sl-label-size: 10px;

  --sl-action-btn-font-size: 15px;
  --sl-action-btn-color: white;
  --sl-action-btn-bg: purple;
  --sl-action-btn-border: purple;

  --sl-font-family: "Poppins";

  --sl-map-height: 500px;
}

Customization Examples #

Example 1: Changing Title and Subtitle Colors and Sizes

.asl-store-form {
  --sl-title-color: blue;
  --sl-title-size: 60px;

  --sl-subtitle-color: gray;
  --sl-subtitle-size: 35px;
}

Example 2: Customizing Form Text and Label Styles

.asl-store-form {
  --sl-font-color: #333;
  --sl-font-size: 14px;

  --sl-label-color: #666;
  --sl-label-size: 12px;
}

Example 3: Styling the Action Button

.asl-store-form {
  --sl-action-btn-font-size: 16px;
  --sl-action-btn-color: #fff;
  --sl-action-btn-bg: #007bff;
  --sl-action-btn-border: #007bff;
}

Example 4: Setting the Font Family and Map Height

.asl-store-form {
  --sl-font-family: "Arial, sans-serif";
  --sl-map-height: 400px;
}

The above mentioned fonts need to be installed on your site. By utilizing these CSS variables, you can create a store registration form that matches your site’s design and branding.