问题描述
我正在尝试制作一个包含多个页面"的顶点表单,以便我可以实现漂亮的布局.
I'm trying to make an apex form that has multiple 'pages' within it, so that I can achieve a nice layout.
例如:第 1 页 - 个人详细信息 >> 第 2 页 - 职业 >> 第 3 页 - 职业历史 >> 提交
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.
推荐答案
这是一个广泛的问题 - 有很多可能的解决方案.您需要在页面上创建多个区域,以便无需提交页面即可轻松显示或隐藏不同的页面项目集.
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.
如果您只是想保持页面整洁,您可以使用 Hide and Show Region
模板,或者您可以创建一个 Region Display Selector
区域.
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:
- 使用表单向导设置页面项目.
- 创建三个 HTML 区域 -
Personal Details
、Occupation
和Career History
. - 将页面项目移动到适当的区域.
- 删除向导创建的原始区域以及默认按钮.
- 在每个区域创建导航按钮 - 可能是
Personal Details
、Next
和Previous
按钮中的Next
按钮在Occupation
中,以及Career History
中的Previous
和Submit
. - 为每个按钮创建动态操作.
Submit
按钮当然是提交页面.Next
和Previous
按钮会根据需要显示和隐藏区域.
- Set up the page items using the Form wizard.
- Create three HTML regions -
Personal Details
,Occupation
, andCareer History
. - Move the page items into the appropriate regions.
- Delete the original region created by the wizard, together with the default buttons.
- Create navigation buttons in each region - probably a
Next
button inPersonal Details
,Next
andPrevious
buttons inOccupation
, andPrevious
andSubmit
inCareer History
. - Create dynamic actions for each of the buttons. The
Submit
button submits the page of course. TheNext
andPrevious
buttons show and hide the regions as appropriate.
这篇关于创建包含多个页面的 Apex 表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!