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
10 replies
Subscribers
10 subscribers
Views
5083 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
Hello Everybody, Does anyone know how to make a text/paragraph field
Jin Pheh
Certified Associate Developer
over 9 years ago
Hello Everybody,
Does anyone know how to make a text/paragraph field only required when the user tries to submit via a specific button? Currently validations on form elements do not trigger when they are blank and I can't use the "required" option since I need to check the validation only when clicking a specific button. I have created a dummy snippet that demonstrates the problem:
load(
local!comment,
a!formLayout(
firstColumnContents: {
a!paragraphField(
value: local!comment,
saveInto: local!comment,
validations: if (len(local!comment) = 0, "You must enter a phrase.", ""),
validationGroup: "comment"
)
},
buttons: a!buttonLayout(
primaryButtons: a!buttonWidgetSubmit(label:"Validate", validationGroup: "comment"),
secondaryButtons: a!buttonWidgetSubmit(label:"Cancel")
)
)
)
OriginalPostID-139172
OriginalPostID-139172
Discussion posts and replies are publicly visible
Top Replies
venkats533
over 9 years ago
+1
try using validationGroup - on the specific button. define validation on the text box or paragraph filed. read forum recipes for sample code.
Parents
0
utkarshs
over 9 years ago
Well you can try writing your condition in required field for example if value for your button is "test" and you are using BtnAction as your variable to store it then you can write the condition in required that if (ri!BtnAction="test", {Value if true}, {})
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
utkarshs
over 9 years ago
Well you can try writing your condition in required field for example if value for your button is "test" and you are using BtnAction as your variable to store it then you can write the condition in required that if (ri!BtnAction="test", {Value if true}, {})
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data