Show/Hide subform using buttons

Avatar

Avatar

vigneshs5397046

Avatar

vigneshs5397046

vigneshs5397046

25-09-2017

Hi,

I am new to the "LiveCycle Designer". I want to create a form which has 4 Sections "Experience", "Skills", "Education Details", "Personal Details". Based on the below screenshot the sections are formatted and the main sections are created as subform ("ExpForm", "SkillsForm", "EDForm" and PDForm").

Screenshot.png

Each sections has 5 bullet points and that I created as separate subform ("ExpSubForm", "SkillsSubForm", "EDSubForm" and "PDSubForm") and these subforms are hidden. So. when we click the experience section "Plus" button the hidden subform should be "visible" and the skills should automatically goes down likewise I need to do for all the four main sections and the user click the "Minus" button the visible bulleted subform should be "hidden" and skills should automatically goes up.

Kindly do the needful.

Thanks in advance.

Accepted Solutions (0)

Answers (8)

Answers (8)

Avatar

Avatar

MinusZero

Avatar

MinusZero

MinusZero

02-10-2017

It has been explained already, but this is what i have done previously. I have two subforms, core and support. Support is a subform within Core.

On the core subform i have a button to hide and one to show the support subform. In the click event i simply had Support.presence = "hidden; and Support.prescence = "visible"; and it worked for me.

Image showing structure

1316661_pastedImage_1.png

Clicking the highlighted buttons within the Core subform hide and show the Support subform.

Avatar

Avatar

yanip

Avatar

yanip

yanip

29-09-2017

was it giving you an error when you look at the javascript debugger.

have you refresh the form using xfa.layout.relayout, although i don't think its necessary
can you upload a picture of the hierarchyscreen?

Avatar

Avatar

mouslander

Avatar

mouslander

mouslander

29-09-2017

Send the form to my email address and I will look at it mousland@gmail.com

Avatar

Avatar

vigneshs5397046

Avatar

vigneshs5397046

vigneshs5397046

29-09-2017

It's a dynamic form see the below screenshot for reference.

when the form opened it will be like the below screenshot.

Picture2.png

The below screenshot shows, How the output should come?

Picture1.png

"Bulleted" texts are sub-forms and that are hidden, when user clicks the plus button of "experience" section below bulleted text should be visible and "Application Skills" box should go down.

And I already tried the (this.parent.subformname.presence = "visible") code and it is not working.

Avatar

Avatar

yanip

Avatar

yanip

yanip

29-09-2017

Are the subform static or you create using the table repeat option so you can create the subform once then have 5 copies?

Are the button on the same hierarchy level as the hidden subform?

If so something like (this.parent.subformname.presence = "visible") should do the trick.

or you can use whole subformname.

your probably gonna need to do "xfa.layout.relayout()" as well so that the form layout is refresh.

Avatar

Avatar

vigneshs5397046

Avatar

vigneshs5397046

vigneshs5397046

29-09-2017

I am not able to upload my form in this website.

Avatar

Avatar

m_tirpak

Avatar

m_tirpak

m_tirpak

28-09-2017

Can you post your form? I've done similar things before and I think I have a solution. I just want to be sure I'm understanding the situation.

Avatar

Avatar

vigneshs5397046

Avatar

vigneshs5397046

vigneshs5397046

26-09-2017

Kindly can anyone reply on this question??