All fields within a Form Section

amkatulak
Giga Expert

Is there a way to get all the fields within a section using a client script?  

I need to make all fields within two sections read-only onLoad, but not in a third section.   I would like to use a script similar to this

function onCondition() {

var fields = g_form.getEditableFields();

for (var x = 0; x < fields.length; x++) {

      g_form.setReadOnly(fields[x],true);

}

}

since I have quite a few fields to set.

3 REPLIES 3

adiddigi
Tera Guru

I'm sorry beforehand because I don't know how to do it using perl.



But, are you only looking for Perl? I have snippets that can insert it using Python.


ScienceSoft
Tera Guru

In this case a client script will be work so slowly. The best way is use the UI Policy Actions in the UI Policy module. Below are pictures with a possible solution of the problem

find_real_file.png

find_real_file.png

Life Saver.. i have been searching for this for so long.. same field multi sections same form and client script was only executing only on 1st id

THANKSS!!😁