Country selector field plugin for djangocms-form-builder
Project description
djangocms-form-builder-countries is a plugin extension for djangocms-form-builder that adds a country selector field to the form builder.
It integrates django-countries with the Django CMS Form Builder, providing a dropdown field with all ISO 3166-1 countries and localized country names.
Key Features
Country dropdown field for djangocms-form-builder forms
All ISO 3166-1 countries with localized names
Configurable “countries first” option to prioritize specific countries (e.g., DACH region: Germany, Austria, Switzerland)
Full integration with form builder validation and submission system
Bootstrap 5 compatible styling
Works with djangocms-form-builder’s XHR-based form submission
Installation
Install the package via pip:
pip install djangocms-form-builder-countries
Or with your preferred package manager.
Configuration
Add the package to your INSTALLED_APPS:
INSTALLED_APPS = [
...
'django_countries',
'djangocms_form_builder_countries',
...
]
No migrations are required as the plugin uses a proxy model.
Usage
After installation, a new “Country” field type will be available in the Django CMS Form Builder structure board under the “Forms” module.
Adding a Country Field
Create or edit a form in the Django CMS structure board
Add a new plugin to the form
Select “Country” from the “Forms” module
Configure the field:
Field Label: The label shown to users
Field Name: The internal field name for form processing
Required: Whether the field is mandatory
Placeholder: Text shown when no country is selected
Optionally configure “Countries First” to show specific countries at the top of the dropdown
Countries First Feature
The “Countries First” option allows you to prioritize specific countries at the top of the dropdown list. This is useful for forms targeting specific regions.
For example, for a form targeting the DACH region, you can select:
Germany (DE)
Austria (AT)
Switzerland (CH)
These countries will appear at the top of the list, followed by a separator and all other countries in alphabetical order.
Requirements
Python 3.9+
Django 4.2+
django-cms 4.1+
djangocms-form-builder 2.0+
django-countries 7.0+
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Fork the repository
Create your feature branch (git checkout -b feature/amazing-feature)
Commit your changes (git commit -m 'Add some amazing feature')
Push to the branch (git push origin feature/amazing-feature)
Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file djangocms_form_builder_countries-0.1.0.tar.gz.
File metadata
- Download URL: djangocms_form_builder_countries-0.1.0.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4aaeccbf255b9bfb59c4f652ae4466d2a97a3c3ee0f3db83294a511ad2b04bf8
|
|
| MD5 |
7d9fb596186c05a0e3f6730050ba342a
|
|
| BLAKE2b-256 |
e42527272e08ea311b913f0d1381d112f02445f3d097bc3496f06cb4f0f3c33a
|
Provenance
The following attestation bundles were made for djangocms_form_builder_countries-0.1.0.tar.gz:
Publisher:
publish.yml on altipard/djangocms-form-builder-countries
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
djangocms_form_builder_countries-0.1.0.tar.gz -
Subject digest:
4aaeccbf255b9bfb59c4f652ae4466d2a97a3c3ee0f3db83294a511ad2b04bf8 - Sigstore transparency entry: 732694912
- Sigstore integration time:
-
Permalink:
altipard/djangocms-form-builder-countries@21e5eed040921e3fdaa1cb53c76e333f32301513 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/altipard
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@21e5eed040921e3fdaa1cb53c76e333f32301513 -
Trigger Event:
release
-
Statement type:
File details
Details for the file djangocms_form_builder_countries-0.1.0-py3-none-any.whl.
File metadata
- Download URL: djangocms_form_builder_countries-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
196ec74b735eca964c3c5659bd7fe7e229955dc059b97cd4f3c83a91a2e48143
|
|
| MD5 |
b4aa17145309626e5e4730c2ba82695c
|
|
| BLAKE2b-256 |
520a3583a8460d422dc7e5ce50e9588c8a08d1642828e948ef97ddff2463d7ef
|
Provenance
The following attestation bundles were made for djangocms_form_builder_countries-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on altipard/djangocms-form-builder-countries
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
djangocms_form_builder_countries-0.1.0-py3-none-any.whl -
Subject digest:
196ec74b735eca964c3c5659bd7fe7e229955dc059b97cd4f3c83a91a2e48143 - Sigstore transparency entry: 732694913
- Sigstore integration time:
-
Permalink:
altipard/djangocms-form-builder-countries@21e5eed040921e3fdaa1cb53c76e333f32301513 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/altipard
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@21e5eed040921e3fdaa1cb53c76e333f32301513 -
Trigger Event:
release
-
Statement type: