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
5 replies
Subscribers
8 subscribers
Views
1857 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
Hi All Event rules can be usen on Forms for hiding and showing some f
aayusha
Certified Senior Developer
over 10 years ago
Hi All
Event rules can be usen on Forms for hiding and showing some form fields as mentioned at
forum.appian.com/.../Creating_Dynamic_Form_Fields
Can we change a field to read only or Required also by using event rules only?
Thanks...
OriginalPostID-79861
OriginalPostID-79861
Discussion posts and replies are publicly visible
0
bhanuprakashg
over 10 years ago
To make a field readonly or required you need to make use of Advanced Form Utils.
FormAPI.setReadonly(fieldId,true);
FormAPI.setRequired(fieldId,true);
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
mohanp
over 10 years ago
you can set a field required Conditionally by using
window.FormAPI.setRequired("fieldID",true);
window.FormAPI.setRequired("fieldID",false);
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 10 years ago
Take a look at this post
forum.appian.com/.../2102
but keep in mind that using JavaScript is not recommended because that makes your form non-mobile compliant.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Mike Schmitt
Certified Lead Developer
over 10 years ago
re: the original question - i'm not entirely sure what you're trying to accomplish but i have use cases requiring this in my project. the workaround is actually rather simple: you create two fields on the form (usually i put them next to each other), one is editable and the other is read-only (and/or disabled), and i set them both to "hide/show" in such a way that only one of them shows up at any given time. The effect on the user-end is seamless, and no javascript is required; it's fully mobile-compliant and almost no extra work on the designer.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
aayusha
Certified Senior Developer
over 10 years ago
Thanks everyone. As Eduardo explianed using javascript, the form becomes non-mobile compliant, therfore Ithink I will be going for mschmitt's solution.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel