Page 1 of 1

can i move these save, delete buttons

Posted: Thu May 24, 2018 2:16 pm
by ajay
Hi,
can i move these save, delete buttons to somewhere else in the form?

Re: can i move these save, delete buttons

Posted: Thu May 24, 2018 2:44 pm
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);
   }
   
}

Re: can i move these save, delete buttons

Posted: Fri May 25, 2018 10:25 am
by admin
.