Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE: Have different labels for country_subdivision question type. #258

Open
pabloelisseo opened this issue May 22, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@pabloelisseo
Copy link
Contributor

Detailed Description

Right now we can only include one label to the country_subdivision question type. However, different countries subdivisions have different names (e.g. United Kingdom subdivisions are called Counties while Germany subdivisions are called Regions)

Context

We use this type of questions and right now we need to create several dependant questions with almost the same configuration instead of having just one with several labels depending on the country.

Possible Implementation

The label property could be an object instead of a string:

{
     "type": "country_subdivision",
     "label": {
        "en": "County",
        "de": "Region"
    },
    "name": "country_subdivision",
    "placeholder": "Please make a selection",
    "config": {
        "countryQuestionName": "country",
        "valueType": "name",
        "search": true
    },
    "errorMessages": {
        "required": "This field is required"
    },
    "registerConfig": {
        "required": true
    }
}

Your Environment

  • Version used: @onebeyond/react-form-builder: v2.3.1
  • Environment name and version (e.g. Chrome 39, node.js 5.4): Not relevant
  • Operating System and version (desktop or mobile): Not relevant
  • Link to your project: https://github.com/greenroomdigital/taylormade
@pabloelisseo pabloelisseo added the enhancement New feature or request label May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant