Welcome to the nuBuilder Forums!

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

Hide/unHide custom action button

Questions related to customising nuBuilder Forte with JavaScript or PHP.
Post Reply
yvesf
Posts: 315
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 87 times
Been thanked: 11 times

Hide/unHide custom action button

Unread post by yvesf »

Hello,

I have created an action button which works only when the current form is saved. Unfortunately, I have the button clickable event when the button save is red.(not saved).
Capture.PNG
The after save could be leverage but in php. Is it possible to add a nuActionButton after save in php ?


Yves
You do not have the required permissions to view the files attached to this post.
yvesf
Posts: 315
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 87 times
Been thanked: 11 times

Re: Hide/unHide custom action button

Unread post by yvesf »

with nuAfterSave() which is a javascript nubuilder function ? I have tried, in the custom code behind the form, I have not found how to have this function working.

Yves
kev1n
nuBuilder Team
Posts: 4297
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: Hide/unHide custom action button

Unread post by kev1n »

In the form's Custom Code, add:

Code: Select all

nuEnable('nuSendButtonButton', !nuIsNewRecord());
This function enables an object an id of "nuSendButtonButton" if the nuIsNewRecord() function returns false, and disables it if the function returns true.

nuIsNewRecord() returns a boolean value indicating whether the current record being displayed is a new record (not yet saved) or an existing record.
Post Reply