cancel
Showing results for 
Search instead for 
Did you mean: 

How to hide the fields in the form during run time

sreelatha_gullapalli
Active Participant
0 Kudos

Hi All,

Can anybody provide me the procedure or approach how to hide or populate the values in the fields in the adobe form based on the input that has been provided in the form during the runtime.

Thanks in Advance.

Thanks & Regards,

Sreelatha Gullapalli.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Sree Latha,

Whatever venkatesh and Anton said is right.

You need to choose right event on your interactive form. There you need to write Java script or Form calc to hide respective fields. To do this, select the right event. Select the field which should get hide and click control button on it. Automatically xfa.resolveNode ("data.#subform[6].WagetypesTable.Pay_Mix") this java script will appear on your selected event. Here Pay_Mix is my field name. Then to hide this Pay_Mix field, after that closed bracked write . presence = "hidden".

The below if condition is the condition when this field should get hide.

if ((this.rawValue == null) || (this.rawValue == "0"))

{

xfa.resolveNode("data.#subform[6].WagetypesTable.Pay_Mix").presence = "hidden";

}

Regards,

nspkumar.

sreelatha_gullapalli
Active Participant
0 Kudos

Hi NSPKumar,

Thank you so much for your responce. Here my requirement is depending on the othere filed value I need to hide a perticular fields.

For example if you take Three fields in form A,B,C.

If the Value(FieldA) = 'X' then

field 'B' should be Enabled

elseif Value(FieldA) = 'Y' then

field 'C' should be Enabled.

I hope my above example is clear.

Can you suggest how to achieve that during run time.

Thanks & Regards,

Sreelatha Gullapalli.

Former Member
0 Kudos

Hi,

You can achieve it by writing the script in this way.

if ( fielda.rawValue == 'a')

{

fieldb.presence = "visible";

}

elseif (fielda.rawValue == 'b')

{

fieldc.presence = "visible";

}

make sure to hide your fields b and c before execution. This should help. Also use help from adobe life cycle designer. You can get lot of options. Let me know if you have any questions.

sreelatha_gullapalli
Active Participant
0 Kudos

Hi Anup,

Thank you for your response.

Can you please let me know in which event I need to write the code.

Thanks & regards,

Sreelatha Gullapalli.

Former Member
0 Kudos

Hi,

You can hide/populate the values with Scripting at the form level. write the conditions in the layoutready event of script.

Thanks,

VR

AntonPierhagen
Active Participant
0 Kudos

You can do this by selecting the right event when you want to hide those element. Within such a event you can enter scripting.

In SDN you can download a form with the specification how to create javascript or actionscript.

Also an document can be downloaded with the specification of these 2 program languages.

You can find a very good example of hiding values in your forms.