Welcome to the nuBuilder forums!

Please register and login to view forums and other content only available to registered users.

[Changed] Split up Form Custom Code JS

Information about updates, news, Code Library
admin
Site Admin
Posts: 2781
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5
Been thanked: 1 time

[Changed] Split up Form Custom Code JS

Unread post by admin »

Instead of having the Browse and Edit specific JavaScript code in one textarea, use the new additional fields for Browse and Edit. Especially if the code is longer, it helps to have the code split up.
Another advantage is that the whole JavaScript is not always loaded but only for the respective form type.

Until now, you had to check the form type so that a certain code was only executed when the browse or edit form was loaded.
custom_code_js.png
custom_code_js.png (41.7 KiB) Viewed 159 times
Adding JS code to the "Browse" field will execute it only when the Browse Form is loaded. The same applies to the Edit field.
Code in Edit & Browse will still be executed for Edit, Browse and Launch forms. (Especially for backwards compatibility reasons).
Post Reply