newdevs:code:angular-field-order
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
newdevs:code:angular-field-order [2024/06/05 12:55] – tmccanna | newdevs:code:angular-field-order [2024/06/05 13:29] (current) – [Adding Field Row Styling to Modals] tmccanna | ||
---|---|---|---|
Line 2: | Line 2: | ||
====== Control Field Order and Styling in Form Modals ====== | ====== Control Field Order and Styling in Form Modals ====== | ||
- | ===== Field Order ===== | + | ===== Controlling |
- | If you do not specify the field order when opening an Angular form in a modal, the fields will be displayed in alphabetical order. To improve readability and usability, it is best to specify the desired field order either through the relevant routing.module.ts (for dynamically-created interfaces) or through the HTML template (for interfaces that have additional customizations). | + | If you do not specify the field order when opening an Angular form in a modal, the fields will be displayed in alphabetical order. To improve readability and usability, it is best to specify the desired field order either through the relevant routing module (for dynamically-created interfaces) or through the HTML template (for interfaces that have additional customizations). |
==== Via the Routing Module ==== | ==== Via the Routing Module ==== | ||
- | If you do not specify | + | When you are working with a basic, dynamically-created interface you can control |
+ | |||
+ | < | ||
+ | path: ' | ||
+ | | ||
+ | data: [{ | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | |||
+ | A good example of this is in / | ||
==== Via the HTML Template ==== | ==== Via the HTML Template ==== | ||
Line 14: | Line 27: | ||
The grid column and modal field order can be controlled by adding the **fieldOrder** parameter to the relevant HTML file: | The grid column and modal field order can be controlled by adding the **fieldOrder** parameter to the relevant HTML file: | ||
- | | + | < |
An example of this in action can be seen in admin-carousel.component.html: | An example of this in action can be seen in admin-carousel.component.html: | ||
+ | < | ||
< | < | ||
[preloadLinkedValues]=" | [preloadLinkedValues]=" | ||
Line 30: | Line 44: | ||
owning_lib_filter: | owning_lib_filter: | ||
</ | </ | ||
- | | + | </ |
Note that you can also make use of the **hiddenFieldsList** parameter for fields that do not need to show on the form, and of the **readonlyFields** parameter to make specified fields uneditable. | Note that you can also make use of the **hiddenFieldsList** parameter for fields that do not need to show on the form, and of the **readonlyFields** parameter to make specified fields uneditable. | ||
+ | |||
+ | ===== Adding Field Row Styling to Modals ===== | ||
+ | |||
+ | Beginning in Evergreen 3.13 ([[https:// | ||
+ | |||
+ | First, you will need to identify the fieldmapper' | ||
+ | |||
+ | Then, modify **eg2/ | ||
+ | |||
+ | < | ||
+ | .row { | ||
+ | | ||
+ | | ||
+ | } | ||
+ | |||
+ | /* Modal for Local Admin > Hold Policies */ | ||
+ | .chmm .row.item_owning_ou, | ||
+ | .chmm .row.user_home_ou, | ||
+ | .chmm .row.holdable, | ||
+ | .chmm .row.requestor_grp { | ||
+ | | ||
+ | | ||
+ | } | ||
+ | |||
+ | </ | ||
+ | |||
+ |
newdevs/code/angular-field-order.1717606506.txt.gz · Last modified: 2024/06/05 12:55 by tmccanna