
This DatoCMS plugin includes a FieldExtension applicable to a JSON field: it will display 2 fields for selecting a continent and one or more countries of the selected continent. Optionally it's possible to display only the countries selector, just activate the switch.
After installing the plugin, you'll need to add a new JSON field type to a block or model, go to the Presentation tab, and select "Geographic Area" for the Field editor.
The data structure will be a stringified JSON object with the following structure:
{ "continent": "north-america", "countries": ["canada", "cuba"]}Note: if the flag to display only the countries is on, then the continent value will be null, i.g.:
{ "continent": null, "countries": ["canada", "cuba"]}Developed with love by goodbase