No module Published on Offcanvas position

Apply script to header and BPF fields

Apparently it's possible to apply Javascript to the headers and/or fields in your BPF flow. This allows you to lock fields or populate them like you would normal fields within your form.
Neat right?

From what I understand, the command isn't that different from what you would normally do on a form, exept you have to either add header or header_process in front of the field you want it applied to. 
This is because CRM Dynamics adds these when doing it's own thing with the header and BPF fields and you can leverage this using Javascript.

To change the value in a field:
formcontext.getAttribute(“header_thisismyfield”).setValue("random");

To hide the field:
formcontext.getControl("header_thisismyfield").setVisible(false); //True or False

To lock the field:
formcontext.getControl("header_thisismyfield").setDisabled(true); //True or False

To make the field required:
formcontext.getControl("header_thisismyfield").setrequiredlevel("required") //None, Recommended or Required are options

You can use the same lines if you need to change it in a BPF flow, just change the field name to header_process_thisismyfield and you are all set!
You can pretty much all kinds of logic with this, no problemo!