cancel
Showing results for 
Search instead for 
Did you mean: 

Hide a subform when selecting a value in a drop down list

Former Member
0 Kudos

Hi,

Do you know how to hide a subform in an interactive form when user select a specific value in a drop down list?

In my forms,I have a drop down list whith 2 values an 2 subforms with different fields . Depending on user selection,

I have to hide the unselected subform.

Do you know how to do this?

Many thanks

Karim

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Karim,

You can place a script code on exit event of the dropdown which will get executed once user selects something in the DD.

Below code can be used for hiding the subform:

FormName.PageName.SubformName.presence = "hidden";

Hope this helps!!

Regards,

Arafat

Former Member
0 Kudos

Thanks Arafat,

But the form is never hidden. Is there something else to do to allow subform to be hidden?

thanks, point will be rewarded

Karim

Former Member
0 Kudos

Hi Karim,

in the exit method of the DD,

enter the javascript as follows,

get the value of the seleced value.

code the if statement to execute the initialise of the subform based on selected.

in the initialise method of the subform.

describe the presence.

Regards,

Sithi

Former Member
0 Kudos

Hi sithi

First of all,thanks for your help. But my problem is still the same.

1) When the interactive form is loaded at firts time, the 2

subforms are correctly initializate. One is visible and the

other is hidden.

2) In the EXIT event of my DDL, I call the execInitialize()

method of my 2 subforms. The initialize event are called but

there is no changes to the layout.

3) Is it possible to change the layout after the redering of a form?

Thanks for your answer

Karim

Former Member
0 Kudos

hi,

try to display the delected value on the dd in the pp from the initialise method of the subform.

so that u can verify , whether initialize is called and selected value.

then verify , whether u have coded for the same value.

regards,

Sithi

Former Member
0 Kudos

Hi,

The initialize method is called, I've check

but $.presence = "hidden" has no effect.

I realy don't know why

Karim

Former Member
0 Kudos

Hi Karim,

you need to create a dynamic PDF form to be able to change the presence of form fields.

Regards,

Juergen

Former Member
0 Kudos

Hi,

To change the layout of a page you have make the whole page as flowed

Thanks

Gopal.

Former Member
0 Kudos

Hi Karim,

I am able to hide the subform in my case without any additional coding. I am using Adobe Reader 8.1.2.

Script language is Javascript.

If the issue still persist then let me know.

Regards,

Arafat

Former Member
0 Kudos

Hi Karim,

In the view where you have placed the Interactive Form UI element, set the PDF as dynamic by writing the below code in wdDoModifyView():

IWDInteractiveForm form = (IWDInteractiveForm)view.getElement("InteractiveForm");

form.setDynamicPDF(true);

Hope this will resolve the issue.

Regards,

Arafat

Former Member
0 Kudos

Thanks Arafat.

Is there any other methode than "setDynamicPDF()".

This one seems to be deprecated?

Thanks Karim