Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Redirect user to another section and get back user to original section back?

Avatar

Level 8

Hello

I am developing a adobe interactive form with 4 sections/blocks to represent each sub form. I have 4 sub forms, say my_sub_form_1..... my_sub_form_2.......... my_sub_form_3........ my_sub_form_4, say, here user is family_head

My requirement is; I need to put a BUTTON_1 (button caption is "GO_TO_my_sub_form_4" its for adding family members) on the my_sub_form_2 (it represents Family_head_details), when user clicks this button, then i the user (cursor) has to go to my_sub_form_4 so that user will enter some data there.

In the same way,  I need to put a BUTTON_2 (button caption is "GO_BACK_TO_my_sub_form_2") on the my_sub_form_4(it represents Family_member_details), when user clicks this button, then i the user (cursor) has to go to my_sub_form_2 back.

So, say, there are 4 family members in the family, so, user will click the BUTTON_1..... 4 times and adds 4 people details each time, finally, submits the form.

Pls. let me know in Java Script,

1) How can i take the user/cursor from 2nd section to 4th section on clicking of the button_1?

2) How can i get back to the original section/sub form (section_2)?

3) Do i need to create the INSTANCES each time for the section_4 (family_member_section)?

4) How can i manage the adding each time data of a family member, here its 4 members?

5) Say, after adding the 1st member, pls. let me kmow where the 1st member data will be stored? then 2nd member? like so....

May be in other case, there are 2 family members, in other case 10 members, its dynamic

Thank you

4 Replies

Avatar

Level 10

Hi,

Here is an example of a single button that when clicked gives a pop-up menu where the user can select where they want to go. http://assure.ly/h4sIcQ.

Another example shows how you can build dynamic tables with Tables or Subforms (Table 6). http://assure.ly/gk8Q7a.

  1. You can use xfa.host.currentPage method or the xfa.host.setFocus() method on an object in the 4th section. See the help and examples.
  2. Again either of the two methods will work.
  3. Your form will need to be saved as a Dynamic XML Form. They layout for section 4 will need to be set to Flowed and you will need Add and Delete buttons. See these examples here: http://assure.ly/eSGQMt (Flowed/Positioned) and http://assure.ly/e2jR0C (expanding objects in flowed subforms).
  4. You would wrap all of the fields for one family member into a subform and then using the instanceManager (and +/- buttons) you would allow the user to create a new instance of the subform.
  5. If the subform is called my_sub_form_4, then each instance of this subform has its own instance number, using a zero based system. So my_sub_form_4[0], my_sub_form_4[1], my_sub_form_4[2], ... my_sub_form_4[n]. Data is stored in each field in its own subform.

Hope that helps,

Niall

Avatar

Level 8

Thank you.

Any additional help from any others pls?

Avatar

Level 8

Any further tips pls. from any body pls?

Thank you       

Avatar

Level 7

Hi Niall,

The popup menu is REALLY a nice feature, I hadn't seen that before.  Thanks for posting.

djaknow