Choose your country in the form’s field

Last Updated: 11.03.2019

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.

form_edit

2. Add a new Select field to your form.

add_seelct_field

3. Set the label and name attribute on country.

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

Was this article helpful?

Can’t find what you need?

Let us help you!
Send us a message
We are using cookies for analytical purpose. Learn more.