Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

can i move these save, delete buttons

Questions related to using nuBuilder Forte.
Post Reply
ajay
Posts: 38
Joined: Wed May 16, 2018 1:01 pm

can i move these save, delete buttons

Unread post by ajay »

Hi,
can i move these save, delete buttons to somewhere else in the form?
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: can i move these save, delete buttons

Unread post by toms »

Option 1: Hide the original buttons and create your own ones.
Option 2:
I use the following code to move the Save Button to another position. This will insert the save button after another control. Optionally, the title of the button can be renamed.


Example: Move the Save button, insert it after the control 'memo':

Code: Select all

if (nuFormType() == 'edit') {
	custAttachButtonTo('nuSaveButton','memo','My Save');
}
button_moved.png
Custom functions:

Code: Select all

jQuery.fn.cssNumber = function(prop){
    var v = parseInt(this.css(prop),10);
    return isNaN(v) ? 0 : v;
};

function custAttachButtonTo(btn, dest, title) {
	
   $('#' + dest).after($('#' + btn));
   var t = $('#' + dest).cssNumber("top");
   var h = $('#' + dest).cssNumber("height");
   var l = $('#' + dest).cssNumber("left");
  
      $('#' + btn).css({
        "top":  t + h + 10,
        "left": l,
        "width": "129px",
        "position": "absolute",
        "height": "26px"
    });
	
   if (typeof title !== 'undefined') 
   {
	    $('#' + btn).val(title);
   }
   
}
You do not have the required permissions to view the files attached to this post.
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: can i move these save, delete buttons

Unread post by admin »

.
Post Reply