If you need to include any kind of script at your form, to perform additional dynamic actions, you can enter your script at javascript events tab. There you can place any javascript code needed, with different sections to include the code:

Calcbuilder for Joomla 4