Feature #17498
closedPrevious/Next Buttons on Form to change records
0%
Description
To quickly change between records without closing and reopening the form, buttons with a link to the previous/next record will be included in the form title. To achieve this functionality three new Form.parameter are introduced:
Name | Type | Note |
btnPreviousNextSql | string | Query that selects all the records that should be accessible by the previous/next buttons. The query uses four different keywords (id, [ btnPrevious ], [ btnNext ], [ btnCurrent ]. More details below. |
btnPreviousNextLoop | digit | 0:off (default), 1 If enabled and the first/last record is reached, the previous/next button points to the last/first record. |
btnPreviousNextWrap | string | HTML to wrap the buttons. Default: <span class="pull-right"><div class="btn-group" role="group"> |
Name | Requirement | Note |
id | required | {{! SELECT ... AS id ... }} Primary key from the table that will be used to generate the links |
btnPrevious | optional | {{! SELECT ... AS btnPrevious ... }} Implements AS _link notations and allows for a custom previous-button. Default: button with glyphicon-arrow-left |
btnNext | optional | {{! SELECT ... AS btnNext ... }} Implements AS _link notations and allows for a custom next-button. Default: button with glyphicon-arrow-right |
btnCurrent | optional | {{! SELECT ... AS btnCurrent ... }} Implements AS _link notations and allows for a custom current-button. Will be placed between previous- and next-button. Default: nothing |
Example for the simplest use case:
btnPreviousNextSql={{! SELECT id AS id FROM ... WHERE ... ORDER BY ... }}
Example for a more complex use case:
btnPreviousNextSql={{! SELECT id AS id, 'p:{{pageSlug:T}}...' AS btnPrevious, 'p:{{pageSlug:T}}...' AS btnNext, 'p:{{pageSlug:T}}...' AS btnCurrent FROM ... WHERE ... ORDER BY ... }}
It has been decided that the previous- and next-button link to another record. The possibility to perform a "form update" using the API to load the values of another record into the form without leaving the page was eliminated. Cause was the URL and SIP which would stay unchanged.
Files
Updated by Jan Haller 6 months ago
- File clipboard-202312221019-p40dm.png clipboard-202312221019-p40dm.png added
- File clipboard-202312221021-obe9z.png clipboard-202312221021-obe9z.png added
- Description updated (diff)
Updated by Carsten Rose 6 months ago
- File clipboard-202312311248-pnoa4.png clipboard-202312311248-pnoa4.png added
- File clipboard-202312311249-scf3f.png clipboard-202312311249-scf3f.png added
- File clipboard-202312311251-mmwmx.png clipboard-202312311251-mmwmx.png added
- Status changed from Ready to sync (develop) to Feedback
- Assignee changed from Carsten Rose to Jan Haller
Bitte zuerst den Branch neu auschecken (kleiner Bugfix).
Custom Text:
a) beim ersten Record kein Custom Text bei Prev anzeigen
b) beim letzten Record kein Custom Text bei Next anzeigen
Bei r=0
Updated by Carsten Rose 6 months ago
a) Wenn First/Last erreicht ist: keinen Fake Link anzeigen - entweder gar nichts (leerer Button) oder den Default Arrow.
b) Scheinbar werden die SIP Parameter nicht mit uebergeben - gluecklich wer alle noetigen Informationen im Record hat. Was haeltst du von einem `btnPreviousNextDetail` Keyword, um wie bei subrecords die Parameter zu uebergeben?
Updated by Carsten Rose 5 months ago
`btnPreviousNextDetail` ist nicht noetig: es reicht alle Parameter deren Namen in `Required Parameter NEW|Edit` angegeben sind automatisch anzuhaengen.