Use data sources to integrate data quickly and effectively as options for selection elements in your forms. The approach is the same, whether you have a drop-down list, or a single or multiple choice field.
When users access your form, the data is accessed from the data source and applied as options in the form – without you having to create these options yourself beforehand.
In the case of large datasets and data you often need in your forms, data sources also offer several other advantages.
Avoid repetitive work You can use the same data from a data source in any number of forms, without having to store the data multiple times.
Data updates automatically If the data in your data source changes, you do not need to update your forms manually each time. All of these changes in the data source are applied automatically to the form, because this data is only accessed when the user actually accesses the form.
Using parameters
If you only want to provide your users with some of the data from a data source, you can use parameters to pre-select the data that is accessed. This flexibility allows you to design dynamic forms by displaying only the relevant data.
Ways to use parameters:
Filter data: For example, you can display only a specific region from the country names data source.
Set language: The language of the displayed data can be defined by a parameter, which is particularly useful for international forms.
Determine display order: For weekdays, you can specify which day appears first, which is useful for different week start days.
You can also use data sources without parameters. In this case, all available data will be displayed. However, parameters provide the ability to better tailor the displayed data to the needs of your users.
Parameters for country names
Specifying the region for country names
With the Country names data source, which Formcentric comes with out of the box, you can include country names automatically as options for selection elements in your form. You can use the regionparameter to specify that only country names from certain regions should be displayed.
Possible values for the regionparameter:
Value
Meaning
global
All countries worldwide
emea
Europe, Middle East and Africa
apac
Asia-Pacific
australia
Australasia
north-america
North America
south-america
South America
central-america
Central America
asia
Asia
africa
Africa
oceania
Oceania
europe
Europe
eu
Member States of the European Union
dach
Austria, Germany and Switzerland
efta
Member States of the European Free Trade Association
zip
All countries whose postcodes (zip codes) can be validated by the postcode validator.
Specifying the language for country names
The lang parameter allows you to specify the language in which country names are displayed. This is particularly useful if the form needs to be adapted for users from different linguistic regions.
Possible values for the lang parameter:
Values
Meaning
de
German
en
English
es
Spanish
fr
French
it
Italian
ru
Russian
Autocomplete in the Input field
With the chars parameter, you can enable autocomplete in the input field, displaying dynamic suggestions once users have entered a specified number of characters.
Set chars as the key and define the number of characters required for suggestions to appear. For instance, setting the value to 3 will show all countries that start with the first three letters entered.
Parameters for weekdays
Specifying the first day for weekdays
The weekdays data source generates a list of weekdays. The first parameter allows you to specify which day of the week appears first in the list. This is particularly useful if your users have different week starts, such as Monday in Europe or Sunday in the USA.