Project

General

Profile

Feature #17498

Updated by Jan Haller 6 months ago

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 A new Form.parameter are introduced: 

 |*Name*|*Type*|*Note*| 
 |btnPreviousNextSql|string|Query that selects all _prevNextSql_ allows the user to select multiple records that should which will be accessible by via the previous/next _previous_ and _next_ buttons. 
 The <notextile>The query uses four different keywords (_id_, [_btnPrevious_], [_btnNext_], [_btnCurrent_]. More detail 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">| 

 The keywords in _btnPreviousNextSql_ allow the developer to customize the buttons. 
 |*Name*|*Requirement*|*Note*| 
 |id|required|{{! could look something like this: prevNextSql = {{! SELECT ... AS id ...    }} 
 Primary key from the table that will be used to generate the links| 
 |btnPrevious|optional|{{! SELECT ... AS btnPrevious ... }} 
 Implements id, gr.id AS <notextile>_link</notextile> notations and allows for a custom _previous_-button. 
 Default: button with glyphicon-arrow-left| 
 |btnNext|optional|{{! SELECT ... _grId, 't:Previous|...' AS btnNext ... }} 
 Implements _left, 't:Next|...' AS <notextile>_link</notextile> notations and allows for a custom _next_-button. 
 Default: button with glyphicon-arrow-right| 
 |btnCurrent|optional|{{! SELECT ... _right [, 't:Middle|...' AS btnCurrent _middle] FROM ... }} }}</notextile> 
 Implements AS <notextile>_link</notextile> notations and allows for Every variable that is not _id_, _left_, _right_, _middle_ (e.g. _grId_) will be passed as a custom _current_-button. Will be placed between _previous_- and _next_-button. 
 Default: nothing| 

 Example for parameter in the simplest use case: 
 btnPreviousNextSql={{! SELECT id AS id FROM ... WHERE ... ORDER BY ... }} 
 !clipboard-202312221019-p40dm.png! link. _left_, _right_, _middle_ (optional) allows the user to customize the buttons. 

 Example for a more complex use case: Default will look something like this: 
 btnPreviousNextSql={{! SELECT id AS id, 'p:{{pageSlug:T}}...' AS btnPrevious, 'p:{{pageSlug:T}}...' AS btnNext, 'p:{{pageSlug:T}}...' AS btnCurrent FROM ... WHERE ... ORDER BY ... }} 
 !clipboard-202312221021-obe9z.png! !clipboard-202312201317-fvca1.png! 

 It The position of the buttons can be specified (left or right in the form title). How exactly has not yet been decided that defined. If the _previous_- and _next_-button link to another record. last record is reached, the _next_ button will be disabled. The possibility to perform a "form update" using enable the API user to load the values of another loop from last record into the form without leaving the page was eliminated. Cause was the URL and SIP which would stay unchanged. to first record (and vice versa) should be considered.

Back