Hi, I'm trying to put check boxes with validations ,for that user

Hi,
I'm trying to put check boxes with validations ,for that user need to select atleast one box. I wrote the code for 2 option check boxes and required attribute mentioned in the second checkbox. How can i get the validation on top of the 2 choices(Near Select all that apply) instead at bottom. Please find the attachments for reference. Thanks in Advance.

test.docx

OriginalPostID-168726

OriginalPostID-168726

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Associate Developer
    =load(
    local!x,local!y,
    a!formLayout(
    firstColumnContents: {
    a!textField(
    label: "Select all that apply",
    labelPosition: "ABOVE",
    saveInto: {},
    required:true(),
    readOnly:true(),
    value:if(and(isnull(local!x),isnull(local!y)),""," "),
    refreshAfter: "UNFOCUS",
    validations: {}
    ),
    a!checkboxField(
    labelPosition: "ADJACENT",
    choiceLabels: {"option A"},
    choiceValues: {"X"},
    value:local!x,
    saveInto: local!x
    ),
    a!checkboxField(
    labelPosition: "ADJACENT",
    choiceLabels: {"option B"},
    choiceValues: {"Y"},
    value: local!y,
    saveInto: local!y
    )
    },
    buttons: a!buttonLayout(
    primaryButtons: {
    a!buttonWidgetSubmit(
    label: "Submit"
    )
    }
    ),
    validations: {}
    )
    )
Reply
  • 0
    Certified Associate Developer
    =load(
    local!x,local!y,
    a!formLayout(
    firstColumnContents: {
    a!textField(
    label: "Select all that apply",
    labelPosition: "ABOVE",
    saveInto: {},
    required:true(),
    readOnly:true(),
    value:if(and(isnull(local!x),isnull(local!y)),""," "),
    refreshAfter: "UNFOCUS",
    validations: {}
    ),
    a!checkboxField(
    labelPosition: "ADJACENT",
    choiceLabels: {"option A"},
    choiceValues: {"X"},
    value:local!x,
    saveInto: local!x
    ),
    a!checkboxField(
    labelPosition: "ADJACENT",
    choiceLabels: {"option B"},
    choiceValues: {"Y"},
    value: local!y,
    saveInto: local!y
    )
    },
    buttons: a!buttonLayout(
    primaryButtons: {
    a!buttonWidgetSubmit(
    label: "Submit"
    )
    }
    ),
    validations: {}
    )
    )
Children
No Data