User Tools

Site Tools


newdevs:code:angular-field-order

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
newdevs:code:angular-field-order [2023/01/19 12:32] – created tmccannanewdevs:code:angular-field-order [2023/02/14 13:16] tmccanna
Line 2: Line 2:
 ====== Control Angular Form Field Order ====== ====== Control Angular Form Field Order ======
  
 +If you do not specify the field order when opening an Angular form in a modal, the fields will be displayed in alphabetical order. This can be very confusing, so it is good practice to add a **fieldOrder** parameter to the relevant HTML file. 
  
 +An example of this can be seen in admin-carousel.component.html:
  
 +  <eg-fm-record-editor #editDialog idlClass="{{idlClass}}" 
 +    [preloadLinkedValues]="true"
 +    fieldOrder="owner,name,type,age_filter,max_items,owning_lib_filter,
 +      copy_location_filter,active,id,bucket,last_refresh_time,creator,
 +      create_time,editor,edit_time"
 +    hiddenFieldsList="creator,editor,create_time,edit_time"
 +    [preSave]="mungeCarousel" (recordSaved)="postSave($event)"
 +    readonlyFields="last_refresh_time"
 +    [fieldOptions]="{bucket:{customTemplate:{template:bucketTemplate}},
 +      copy_location_filter:{customTemplate:{template:locationTemplate}},
 +      owning_lib_filter:{customTemplate:{template:orgTemplate}}}">
 +  </eg-fm-record-editor>
 +  
  
-===== Things to add to this page: =====+See the example in git at: https://git.evergreen-ils.org/?p=working/Evergreen.git;a=blobdiff;f=Open-ILS/src/eg2/src/app/staff/admin/local/admin-carousel.component.html;h=aede0adbf96b5f4dbba25baecef3d4cbba8040a2;hp=6740171a14c11e7a3b3b8d81f08d12d3bcac4de2;hb=f5fe60def6e5fe4ed6d0cf9a45401e7250bc1d54;hpb=13bf5d76eafa9f5a3c62d2dcc4b8bd19ddf64393
  
-  * Create example of controlling the form field order on a modal - use the patch here to work from: https://bugs.launchpad.net/evergreen/+bug/1857351 
  
newdevs/code/angular-field-order.txt · Last modified: 2024/06/05 13:29 by tmccanna

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.