Form with groups of checkboxes and radio buttons

Certified Lead Developer

Hi,

What’s the best way to design a screen for the below requirement:

1. A list of document types must be displayed as checkboxes.

2. On selection of a checkbox (document type), one or more Boolean questions must be displayed that a user can answer (radio buttons/ checkboxes will suffice for this)

3. If no document types are selected the no additional questions must be displayed.

4. All the selected document types and it’s respective additional questions/answers Must be grouped as a dictionary/CDT.

Example:

[•] Document - 1

    Is document complete?

    (•) Yes ( ) No

[ ] Document - 2

[•] Document- 3

    Is document Validated?

    ( ) Yes (•) No

Regards,

Sunil Zacharia

  Discussion posts and replies are publicly visible

Parents
  • Hi Sunil,

    Firstly you can store the values in the database
    Then create three radio button with single option in it. When you are selecting the radio button and on the basis of the questions you can show the another condition

    with(
    local!isDocumentCompleted_bool,
    local!isDocumentValidated_bool,
    {
    a!radioButtonField(
    choiceLabels: "Document 1",
    choiceValues: 1,
    value: ri!documentType_int,
    saveInto: ri!documentType_int
    ),
    a!radioButtonField(
    label: "Is Document Complete?",
    choiceLabels: {
    "Yes",
    "No"
    },
    choiceValues: {
    true,
    false()
    },
    value: local!isDocumentCompleted_bool,
    saveInto: local!isDocumentCompleted_bool,
    showWhen: tointeger(
    ri!documentType_int
    ) = 1
    ),
    a!radioButtonField(
    choiceLabels: "Document 2",
    choiceValues: 2,
    value: ri!documentType_int,
    saveInto: ri!documentType_int
    ),

    a!radioButtonField(
    choiceLabels: "Document 3",
    choiceValues: 3,
    value: ri!documentType_int,
    saveInto: ri!documentType_int
    ),
    a!radioButtonField(
    label: "Is Document Validated?",
    choiceLabels: {
    "Yes",
    "No"
    },
    choiceValues: {
    true,
    false()
    },
    value: local!isDocumentValidated_bool,
    saveInto: local!isDocumentValidated_bool,
    showWhen: tointeger(
    ri!documentType_int
    ) = 2
    ),
    }
    )
Reply
  • Hi Sunil,

    Firstly you can store the values in the database
    Then create three radio button with single option in it. When you are selecting the radio button and on the basis of the questions you can show the another condition

    with(
    local!isDocumentCompleted_bool,
    local!isDocumentValidated_bool,
    {
    a!radioButtonField(
    choiceLabels: "Document 1",
    choiceValues: 1,
    value: ri!documentType_int,
    saveInto: ri!documentType_int
    ),
    a!radioButtonField(
    label: "Is Document Complete?",
    choiceLabels: {
    "Yes",
    "No"
    },
    choiceValues: {
    true,
    false()
    },
    value: local!isDocumentCompleted_bool,
    saveInto: local!isDocumentCompleted_bool,
    showWhen: tointeger(
    ri!documentType_int
    ) = 1
    ),
    a!radioButtonField(
    choiceLabels: "Document 2",
    choiceValues: 2,
    value: ri!documentType_int,
    saveInto: ri!documentType_int
    ),

    a!radioButtonField(
    choiceLabels: "Document 3",
    choiceValues: 3,
    value: ri!documentType_int,
    saveInto: ri!documentType_int
    ),
    a!radioButtonField(
    label: "Is Document Validated?",
    choiceLabels: {
    "Yes",
    "No"
    },
    choiceValues: {
    true,
    false()
    },
    value: local!isDocumentValidated_bool,
    saveInto: local!isDocumentValidated_bool,
    showWhen: tointeger(
    ri!documentType_int
    ) = 2
    ),
    }
    )
Children
No Data