cancel
Showing results for 
Search instead for 
Did you mean: 

IF javascript problem

maarten_duits2
Participant
0 Kudos

Hello,

What i would like to do is quitte simple. When a field has a particular value i would like to display other fields.

Say, when field A is 1 then display field B. Default field A presence is set to invisible.

I tried everything to make this possible, but unfortunately i don't get it work.

The code i used is:

xfa.forms.[subform_name].[fieldname].presence = "visible"

I am using NW04s SP09 Adobe designer 7.1

Hope somebody can help me.

Kind regards,

Maarten

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Maarten,

use the form ready event of the subform to check the value of your control field and then set the presence via xfa.form.[subformname].presence or for a specific field xfa.form.[subformname].[fieldname].presence .

If you set the access instead, you should loop through all nodes in the subform and set the access for each field.

p.s. i would suggest to set default presence to show and make invisible in the script.

Kind regards,

Marijn Sponselee

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Marteen,

You have to wrap the 2 fields in one subform. make the field A invisible (make the height and width as 0).Write the script on the subform.first check the value of a is null or not,if the value is null, hide the subform.

Thanks and Regards,

pavan meda

maarten_duits2
Participant
0 Kudos

Hi,

I already wraped the fields in a subform. I don't get it running. So if anybody can send me a sample which works that would be great.

You can mail me at smeagol_gollum[at]zonnet[dot]nl

Thx in advance.

Regards,

Maarten

Former Member
0 Kudos

Hi,

If you prefer Form Calc refer the below message.