cancel
Showing results for 
Search instead for 
Did you mean: 

Make field as greyed out dynamically?

former_member202077
Participant
0 Kudos

Hello

Am developing the Adobe interactive forms, my_form is having all the ADDRESS input fields. Also, my_form has INVISBLE_text_field,

User1 launched the form_: I am getting the data into INVISBLE_text_field of the Adobe (from WebDynPro context-->Data view of adobe) with a value of CITY REGION COUNTRY for User_1. It means i have to set them all as GREYED OUT fields

User2 launched the form_: I am getting the data into INVISBLE_text_field of the Adobe with a value of NAME1 NAME2 for User_2. It means i have to set them all as GREYED OUT fields (NAME1 and NAME2)

 
var myObject = /NAME1/; 
var returnValue = greyFieldsList.search(myObject);
if(returnValue != -1)
xfa.resolveNode("VISITOR.PAGE1.Subform2.NAME1").access = "readOnly";
xfa.resolveNode("VISITOR.PAGE1.Subform2.NAME1.ui.#textEdit.border.fill.color").value = "192,192,192";
 

This is working fine, but, pls. let me know,

1) is this approach is safe/okay/good?

2) i am writing the above validation code for each field(i hv around 125 fields on the form) of the form, i mean, its becoming code REDENENCY, do we have any other better aproach? i guess, FUNCTION will not much help

Thank you

Accepted Solutions (1)

Accepted Solutions (1)

vaibhav_tiwari
Contributor
0 Kudos

Hi,

You can group the fields depending on the user logging in and for that group of fields create one subform(In case its static that these many fields should be read only for this type of user).

Write the readonly code for the subform instead of writing it for different input fields. That would be easier and a good approach.

However if grouping is not possible then due to position of fields on the layout. Then use the current approach.

Regards,

Vaibhav

Answers (0)