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
2 replies
Subscribers
6 subscribers
Views
1158 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
In a form i have almost 20+ fields with value of Field ID having the pattern &qu
ramakg
A Score Level 1
over 13 years ago
In a form i have almost 20+ fields with value of Field ID having the pattern "fldProposal_"; When the form loads, instead of writing 20+ javascript statements that disable each field, any idea how to write a general purpose code that loops through all the 20 fields and disables each?...
OriginalPostID-30653
OriginalPostID-30653
Discussion posts and replies are publicly visible
Parents
0
Eduardo Fuentes
Appian Employee
over 13 years ago
You can use a similar approach to what I posted here
forum.appian.com/.../3518
on Dec 15, 2011.
If all your fields have an ID (given in the FORMS DESIGNER not in the DOM itself) that follows a naming convetion you can do something like this:
function toggleEnabledFlag(prefix,fieldsToDisableArray){
for(var i = 0; i < fieldsToDisableArray.length; i++){
var componentDom = window.Build.util.getComponentContainer(prefix + fieldsToDisableArray[i], window.FormDesigner.runtimeNamespace);
if (componentDom.length > 0) {
componentDom.get(0).disabled=true;
}
}
}
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Eduardo Fuentes
Appian Employee
over 13 years ago
You can use a similar approach to what I posted here
forum.appian.com/.../3518
on Dec 15, 2011.
If all your fields have an ID (given in the FORMS DESIGNER not in the DOM itself) that follows a naming convetion you can do something like this:
function toggleEnabledFlag(prefix,fieldsToDisableArray){
for(var i = 0; i < fieldsToDisableArray.length; i++){
var componentDom = window.Build.util.getComponentContainer(prefix + fieldsToDisableArray[i], window.FormDesigner.runtimeNamespace);
if (componentDom.length > 0) {
componentDom.get(0).disabled=true;
}
}
}
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data