Forum



02:24

15/10/2010

Hi,
Is there someway to add your own buttons to a form edit dialog page beside either the next/previous navigation buttons or beside the submit/cancel buttons?
I would like a button that allows the user to print an envelope while a customer record is displayed in the Form Edit dialog
I do know I can add my own buttons to the bottom of the grid - it would be nice to do it on the Form Edit too.
Thanks!
Jim
21:03

20/03/2009

Hi:
You can do this and here's the steps for how got it working.
1. Clone the submit or cancel button
var clone = $('#sData').clone();
2. Change the properties of the clone element
change the id :clone.attr('id','btn_something_unique');
change the name : clone.attr('name','btn_something_unique');
3. Insert the clone after the element you want:
clone.insertAfter('#SOME_CONTROL');
4. I use UI button so add that to the button created:
$("#btn_something_unique").button({
label :"something"
}).click(function(){
//what the button needs to do
});
5. Because the UI button adds some extra classes we should remove them so the buttons look the same
$('#btn_something_unique').removeClass('ui-button ui-widget ui-button-text-icon-primary');
That should get you going.
Most Users Ever Online: 715
Currently Online:
61 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66