Hi,
can i move these save, delete buttons to somewhere else in the form?
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
can i move these save, delete buttons
-
- Posts: 785
- Joined: Sun Oct 14, 2018 11:25 am
Re: can i move these save, delete buttons
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':
Custom functions:
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');
}
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.