Page 1 of 1

Moving, Spacing, Aligning Standard and new action buttons

Posted: Wed Apr 07, 2021 7:29 pm
by icoso
I found this older post about moving a button into another area of the form.
https://forums.nubuilder.cloud/viewtopic. ... 60&p=17279

What I want to do is when adding a nuActionButton up in the standard button area of the form (where the Save, Delete,Clone buttons are located), IS there anyway to align one of those buttons to the right?
For example, my manager wants the Save button, and my other nuaddaction buttons in their normal location in the button bar (left justified) , but they want the DELETE button moved far to the right so their users dont accidentally click it.
Is there any way to specify/change the spacing and or alignment of those buttons?

Re: Moving, Spacing, Aligning Standard and new action button

Posted: Wed Apr 07, 2021 8:05 pm
by kev1n
1. In Setup -> Header, between the style-tags, add

Code: Select all

nuDeleteButton {    
    margin: 0 0 0 1000px;
}
2. and modify nuOnLoad() like this:

Code: Select all

function nuOnLoad() {

 if(nuFormType() == 'edit'){
     let c = $('#nuCloneButton');
     c.insertBefore($(c.siblings()[c.index() - 1]));
 } else
 if(nuFormType() == 'browse'){
     // Browse Form loaded
 }
 
}