Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
6 replies
Subscribers
7 subscribers
Views
2508 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
Hi, I'm trying to put check boxes with validations ,for that user
shanmukhaprasads
over 9 years ago
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
Chris
over 9 years ago
I would put a textField above with blank value, read only, that is only required if none of the checkbox items are selected:
=load(
local!checkValA: null,
local!checkValB: null,
a!formLayout(
firstColumnContents: {
a!textField(
label: "Select All That Apply",
value: "",
readOnly: true,
required: and(rule!APN_isBlank(local!checkValA),rule!APN_isBlank(local!checkValB))
),
a!checkboxField(
label: "",
labelPosition: "ADJACENT",
choiceLabels: {"OptionA"},
choiceValues: {"Y"},
value: local!checkValA,
saveInto: local!checkValA
),
a!checkboxField(
label: "",
labelPosition: "ADJACENT",
choiceLabels: {"OptionB"},
choiceValues: {"Y"},
value: local!checkValB,
saveInto: local!checkValB/
)
},
secondColumnContents: {},
buttons: a!buttonLayout(
primaryButtons: {
a!buttonWidgetSubmit(
label: "Submit"
)
},
secondaryButtons: {
a!buttonWidgetSubmit(
label: "Cancel",
skipValidation: true
)
}
)
)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Chris
over 9 years ago
I would put a textField above with blank value, read only, that is only required if none of the checkbox items are selected:
=load(
local!checkValA: null,
local!checkValB: null,
a!formLayout(
firstColumnContents: {
a!textField(
label: "Select All That Apply",
value: "",
readOnly: true,
required: and(rule!APN_isBlank(local!checkValA),rule!APN_isBlank(local!checkValB))
),
a!checkboxField(
label: "",
labelPosition: "ADJACENT",
choiceLabels: {"OptionA"},
choiceValues: {"Y"},
value: local!checkValA,
saveInto: local!checkValA
),
a!checkboxField(
label: "",
labelPosition: "ADJACENT",
choiceLabels: {"OptionB"},
choiceValues: {"Y"},
value: local!checkValB,
saveInto: local!checkValB/
)
},
secondColumnContents: {},
buttons: a!buttonLayout(
primaryButtons: {
a!buttonWidgetSubmit(
label: "Submit"
)
},
secondaryButtons: {
a!buttonWidgetSubmit(
label: "Cancel",
skipValidation: true
)
}
)
)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data