cancel
Showing results for 
Search instead for 
Did you mean: 

Changing the field properties (editabel/greyed out) dynamically?

former_member202077
Participant
0 Kudos

Hello

I am developing an Adobe interactive form. My requirement is dynamically changing the filed properties based on the other field values/selections/inputs.

1) For example in the form, if user puts value_A in field_1, then, the field_2 should be greyed out.

2) If user puts value_B in field_3, then, system automatically populate the value_C in field_4 in order to let the user make easy- user friendly

3) If user puts value_D in field_5, then, only allowed value in field_6 is value_E, if by mistake user puts value_F in field_6, then, system should throw error message

Pls. let me know how to achive this DYNAMIC functionality in the FORM or do we need to handle from WEbDynPro ABAP side?

Thank you

Accepted Solutions (1)

Accepted Solutions (1)

vaibhav_tiwari
Contributor
0 Kudos

Hi,

Everything you have mentioned is possible in the form itself. Just write the valid script at valid event of valid field.

1) For example in the form, if user puts value_A in field_1, then, the field_2 should be greyed out.

Ans: Write on change event of Field1:

if($.rawValue eq "value_A")
then
Field2.access = "readOnly"
Field2.fillColor = "192,192,192"
endif

2) If user puts value_B in field_3, then, system automatically populate the value_C in field_4 in order to let the user make easy- user friendly

Ans: Write on change event of Field3:

if($.rawValue eq "value_B")
then
Field4.rawValue =  "value_C"
endif

3) If user puts value_D in field_5, then, only allowed value in field_6 is value_E, if by mistake user puts value_F in field_6, then, system should throw error message

Ans: Write at exit event of Field6:

if(Field5.rawValue eq "value_D" and $.rawValue ne "value_E")
then
xfa.host.messageBox("Wrong Value", "Error", 0)
endif

For such type of scripts you can refer to designer help also. So please check there before posting your query that would save your time.

Regards,

Vaibhav

Answers (0)