Page 1 of 1

Hide/unHide custom action button

Posted: Sun Jan 01, 2023 1:15 am
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

Re: Hide/unHide custom action button

Posted: Sun Jan 01, 2023 2:00 am
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

Re: Hide/unHide custom action button

Posted: Sun Jan 01, 2023 7:56 am
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.