問題描述
我正在嘗試制作一個包含多個頁面"的頂點表單,以便我可以實現漂亮的布局.
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 表單的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!