Skip to content

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

Description

@pabloelisseo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions