How To Set Default Values With nuBuilder Forte

preview_player
Показать описание
nuBuilder Forte is the fourth iteration of nuSoftware's popular open source application. nuBuilder Forte aims to further ease-of-use, and ease-of-creation for both back-end and front-end users. As with all of nuSoftware's offerings, nuBuilder Forte is available to download for free forever to use for whatever purpose desired.

Follow the link for more information

THE CODE:

if(nuIsNewRecord()){
$('#def_val').val(23).change();
}

TRANSCRIPT:
Hi, in this video I’m going to show you how to set a Default Value. This will input a value into a field when loading a new Edit Form. In my example I’ll be adding it alongside a Manual Number and a Calc. Firstly I’ll add the variable in the Javascript section of Custom Code. As you can see when I load a new Edit Form it sets the field straight away. I can also change this field, but note that when I save it, it returns to the default value. So to fix this I’m going to add a custom nuBuilder function called nuIsNewRecord to the previous code. Now when I go to a new Edit Form it will keep any changes I make on the default value, and when I make a new record it will reset the Default Value from the code.
Рекомендации по теме