cancel
Showing results for 
Search instead for 
Did you mean: 

How to display four different templates in same form dynamically

sivab4u
Active Participant
0 Kudos

Hi Friends,

Happy Christmas!!!

I have scenario, where i would be getting importing value/variable(which defines document type) so i have 4 different templates to be displayed in the same form dynamically(any one out of four based on document type). so how to achieve this in Adobe forms?

right now i have two thoughts to achieve this.

1.design one form(Page) and put all the four templates at same place on the same page and display any one dynamically, if so how to achieve this?

2. create four different pages in the same form and dynamically hide remaining three based on document type(importing value), if so how to achieve this?

Please guide me how to achieve this and which is the best practise to do this requirement.

Regards,

Siva B

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Siva,

Assuming this is a print form, another option would be to have four separate form templates and choose the right one in the print program (i.e. changing the parameter for finding the generated function module).

This would simplify maintenance of the form templates (e.g. if page breaks will be required in the future, another person has to make a small change,...). This assumes the form templates are very different from each other.

If the form templates are very similar the option would be to push the decision what to show deeper into the for template than on page level.

Showing an hiding content can be done very efficiently by using subforms that repeat based on data. If a subform is bound to a data node that does not exist it wont show up. Just structure the data accordingly. This avoids writing scripts to show/hide subforms.

Best,

Juergen

sivab4u
Active Participant
0 Kudos

Dear Juergen,

Thanks for your reply.

My scenario is it is 'HR Form' for it declarations indian version. it is mapped in pe03 transaction, so the same form is getting called for four different declarations.

so in this case what would be correct approach. and how to achieve it?

Regards,

Siva

Former Member
0 Kudos

Dear Siva,

I'm not familiar with the transaction. Are the form templates very similar?

Best,

Juergen

sivab4u
Active Participant
0 Kudos

Hi Friends,

As per above requirement, i feel that creating four different pages and displaying any one page dynamically is more suitable.

so for testing, i have created 2 pages and base on conditon in page initialise i am setting as presence as hidden, it is working fine, if condition is failing for page2 it is getting hidden and displaying only page1.

but if the condition is failing for page1 then page1 is showing as blank and page2 is visible.

now how do i hide the page1 when it is blank.

Code i am writing in initialise event:(For reference)

  1. data.#subform[4]::initialize - (FormCalc, client)

if ( $record.IST_TRANS.RETYP eq "SC80" ) then

    $.presence = "hidden"

endif


Friends, out of doubt i made the condition failing for both the pages, but now i am getting single blank page.

Did i miss something???.

Regards,

Siva