Welcome to the nuBuilder Forums!

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

New Record Button & Tab

Questions related to customising nuBuilder Forte with JavaScript or PHP.
Post Reply
acroporax
Posts: 42
Joined: Thu Apr 21, 2022 3:04 pm
Has thanked: 5 times
Been thanked: 1 time

New Record Button & Tab

Unread post by acroporax »

Hi,

First, I added new button in edit form.

Code: Select all

if (nuFormType() == 'edit') {
   nuAddActionButton('new', 'Add New Record', 'nuAddAction();'); 
}
This code works but constantly opens a new form.

Image



Second, How to set TAB to sort?
kev1n
nuBuilder Team
Posts: 4297
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: New Record Button & Tab

Unread post by kev1n »

Hi,

Use nuForm() instead to open a new record in the current Breadcrumb:

Code: Select all

function newRecord() {
    if (nuIsSaved()) {
        nuForm(nuFormId(), '-1', '', '', '1');
    } else {
        nuMessage('The current record must be saved first');
    }
}

nuAddActionButton('new', 'Add New Record', "newRecord();");
kev1n
nuBuilder Team
Posts: 4297
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: New Record Button & Tab

Unread post by kev1n »

May I ask you to ask separate unrelated questions in separated topics? Thanks.
acroporax
Posts: 42
Joined: Thu Apr 21, 2022 3:04 pm
Has thanked: 5 times
Been thanked: 1 time

Re: New Record Button & Tab

Unread post by acroporax »

kev1n wrote: Mon Jun 20, 2022 11:58 am May I ask you to ask separate unrelated questions in separated topics? Thanks.
Sorry,

Thanks for answer.
Post Reply