ScottRedrup
ScottRedrup

Reputation: 91

Create an Apex form with multiple pages

I'm trying to make an apex form that has multiple 'pages' within it, so that I can achieve a nice layout.

For example: Page 1 - Personal Details >> Page 2 - Occupation >> Page 3 - Career History >> Submit

Is there a way to do this without submitting one page at a time as this would mess up my validation for the table entry.

Upvotes: 2

Views: 3276

Answers (1)

Bacs
Bacs

Reputation: 919

It's kind of a broad question - lots of possible solutions. You will need to create several regions on the page, so that you can easily show or hide different sets of page items without submitting the page.

If you simply want to keep the page tidy, you could make use of the Hide and Show Region template, or you could create a Region Display Selector region.

To help the user experience flow a bit better, I would probably do something like this:

  1. Set up the page items using the Form wizard.
  2. Create three HTML regions - Personal Details, Occupation, and Career History.
  3. Move the page items into the appropriate regions.
  4. Delete the original region created by the wizard, together with the default buttons.
  5. Create navigation buttons in each region - probably a Next button in Personal Details, Next and Previous buttons in Occupation, and Previous and Submit in Career History.
  6. Create dynamic actions for each of the buttons. The Submit button submits the page of course. The Next and Previous buttons show and hide the regions as appropriate.

Upvotes: 3

Related Questions