How can we help you?
- Help Center
- Creation
- Advanced scripts & automation
- Selecting your country in the form’s field
Selecting your country in the form’s field
Last updated:
August 7, 2020
Written by:
Teresa

share
Table of contents
share
Table of contents
If you want to create a form with field offering your user many possibilities to choose from, follow the steps below – we will show you how to make a select field with a base of countries.
How to prepare ‘choose your country’ field in the form based on the select field?
1. Go to the edition of your form.

2. Add a new Select field to your form.

3. Set the label and name attribute on country.

4. Save the changes and publish your landing page.
5. Go the Dashboard -> Javascript codes tab of your landing page, add a new script and paste the following JavaScript code to your landing page.
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-formhelpers/2.3.0/js/bootstrap-formhelpers.min.js"></script>
<script type="text/javascript">
$(function() {
$('select[name=" country "]').bfhcountries({country: 'US'});
});
</script>
6. You should see a new form field with a base of countries in Select field in your landing page.
share
Was this manual helpful?

