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.
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:
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.
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 region parameter to specify that only country names from certain regions should be displayed.
Possible values for the region parameter: |
||||
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. |
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 |
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.
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.
Possible values for the first parameter: | ||||
Value | Meaning | |||
mon | Monday | |||
tue | Tuesday | |||
wed | Wednesday | |||
thu | Thursday | |||
fri | Friday | |||
sat | Saturday | |||
sun | Sunday |