Welcome to the nuBuilder Forums!

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

Custom Code Before Save

Questions related to customising nuBuilder Forte with JavaScript or PHP.
kev1n
nuBuilder Team
Posts: 4305
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 446 times
Contact:

Re: Custom Code Before Save

Unread post by kev1n »

Add in the Custom Code of your form:

Code: Select all

if (! nuIsNewRecord()) {
   nuDisable('object_id_here');
}
BDemeuse
Posts: 92
Joined: Mon Apr 12, 2021 3:09 pm
Has thanked: 1 time
Been thanked: 2 times

Re: Custom Code Before Save

Unread post by BDemeuse »

Hi,

Is it a way to change the field properties ('editable') dynamically ?
I do not see any function such as nuSetPropertiesObject or ???

Thks,
Rgds,
Bri
kev1n
nuBuilder Team
Posts: 4305
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 446 times
Contact:

Re: Custom Code Before Save

Unread post by kev1n »

BDemeuse
Posts: 92
Joined: Mon Apr 12, 2021 3:09 pm
Has thanked: 1 time
Been thanked: 2 times

Re: Custom Code Before Save

Unread post by BDemeuse »

Thanks.
I have not seen your previous answer :-(
BDemeuse
Posts: 92
Joined: Mon Apr 12, 2021 3:09 pm
Has thanked: 1 time
Been thanked: 2 times

Re: Custom Code Before Save

Unread post by BDemeuse »

Unfortunately, nuDisable() is undefined ... and I did an upgrade recently :-(
Is not the last one ?

nuBuilder Forte 4.5

DB Version: V.4.5-2021.04.27.00
Files Version: V.4.5-2021.04.26.02

(V.MajorVersion-CurrentDate.BuildNumber)
kev1n
nuBuilder Team
Posts: 4305
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 446 times
Contact:

Re: Custom Code Before Save

Unread post by kev1n »

nuDisable() is a JavaScript function.
BDemeuse
Posts: 92
Joined: Mon Apr 12, 2021 3:09 pm
Has thanked: 1 time
Been thanked: 2 times

Re: Custom Code Before Save

Unread post by BDemeuse »

Many Thanks!!
It works :D 8-)
Post Reply