Custom Code Before Save

Questions related to customising nuBuilder Forte with JavaScript or PHP.

Re: Custom Code Before Save

Unread postby kev1n » Wed May 12, 2021 4:17 pm

Add in the Custom Code of your form:

Code: Select all
if (! nuIsNewRecord()) {
   nuDisable('object_id_here');
}
kev1n
nuBuilder Team
 
Posts: 2012
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: Custom Code Before Save

Unread postby BDemeuse » Fri May 14, 2021 6:04 pm

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
BDemeuse
 
Posts: 20
Joined: Mon Apr 12, 2021 10:39 pm
nuBuilder Version: 4.5

Re: Custom Code Before Save

Unread postby kev1n » Fri May 14, 2021 6:11 pm

kev1n
nuBuilder Team
 
Posts: 2012
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: Custom Code Before Save

Unread postby BDemeuse » Sat May 15, 2021 4:08 am

Thanks.
I have not seen your previous answer :-(
BDemeuse
 
Posts: 20
Joined: Mon Apr 12, 2021 10:39 pm
nuBuilder Version: 4.5

Re: Custom Code Before Save

Unread postby BDemeuse » Mon May 17, 2021 7:49 pm

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)
BDemeuse
 
Posts: 20
Joined: Mon Apr 12, 2021 10:39 pm
nuBuilder Version: 4.5

Re: Custom Code Before Save

Unread postby kev1n » Mon May 17, 2021 8:05 pm

nuDisable() is a JavaScript function.
kev1n
nuBuilder Team
 
Posts: 2012
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: Custom Code Before Save

Unread postby BDemeuse » Wed May 19, 2021 1:37 am

Many Thanks!!
It works :D 8-)
BDemeuse
 
Posts: 20
Joined: Mon Apr 12, 2021 10:39 pm
nuBuilder Version: 4.5

Previous

Return to Custom Code

Who is online

Users browsing this forum: No registered users and 6 guests

cron