Trigger JavaScript
9 min
overview you can run your script and interact with form variables using javascript π form variable the form variable object procesioform describes a form, its related flow, instance, variables and all configured fields { "data" { }, "variables" { } } data β contains information about the current form fields, instance, flow and form attributes variables β holds additional variables related to the form (e g , uploaded files) procesioform data fields defines all form elements each field has configuration such as label, visibility, type, and value, etc check corresponding element's page for documentation fields text input docid\ rz0nskezv5sxjzudz ufx number input docid\ q10eeifthnz6mwtbbru65 date time input docid\ k6el1qenvispcysotec9e textarea docid\ ukx1pks3rfiztzlwu6yhd select input docid\ muo5laimbnbp1fa6wipqg checkbox docid\ icgjoeos4rmv0n7i2jbbr radio button docid 2u9zzgnz79u qgkdw eir button docid 2uawa1p wfg2tfj7 8et dropdown docid 9pbcx1dpx95oqukfydzda file upload docid\ ohds ovmxhbrxjjn bt w signature pad docid\ crpl2ua5a5vle8yhrnnm8 approval docid\ jetcc9zibzhfilryupgxf dynamic assignee across forms docid\ kxbi4hrueqjjiiylr2lxq structure section docid\ tmp3qxqnympvc hp3ok1j list docid\ tnctftfh sgdvrhpmpqeq columns docid 0 qvgcvhmbrnan6nq7ei stepper docid\ dtic8lmok7jezbj eqzff divider docid\ xfyesdugcfasvi3rbeg5w tabs docid\ kladklh9wbaulpsebxtve side panel docid\ k2t50l724ff8gtsc0vzrw heading docid\ vqfv5f4upf42rj7mpztgu paragraph docid\ jfciuaeud bvx3stcy1ny image docid\ utg qn6 ot6qudkzvllik file viewer docid 3lsblcxvd3lhu5srqlvw6 icon docid\ hdkbiht o0teagqdspc 4 chat docid\ lh6ksi8iysaevtdpmr2yb table data table docid\ wvpuh93gishimmhgk56jx static table row docid\ lxhezlzymif rajr1vmcl dynamic table row docid\ yn0atpg3tmctdd1qxu7if procesioform data form data and attributes name description type instance form instance ( check details below ) flow form flow execution ( check details below ) variables extra form variables ( check details below ) procesioform data instance information about the form instance and users name description type id unique identifier of the form instance string workspaceid workspace id where the instance belongs (if any) string | null submitter info about the user who submitted the form object submitter id submitter user's unique id string | null submitter name submitterβs name string | null submitter email submitterβs email string | null currentuser info about the currently logged in user object currentuser id current userβs unique id string | null currentuser name current userβs name string | null currentuser email current userβs email string | null procesioform data flow information about the flow execution connected to this form name description type values id flow id string | null startdate when the flow started string | null enddate when the flow ended string | null status current flow status string | null in progress , completed , approved , rejected statusenum possible status values (enum) object procesioform variables holds extra variables created on the form getting started choose trigger javascript event write your script in the editor (you can enlarge the editor pressing esc button) example this script allows to access to form data example of usage 1\ get field value const value = procesioform data fields input1 value; 2\ set field value procesioform data fields input1 value = "value"; 3\ set field readonly state procesioform data fields input1 readonly = true; where input1 is element name 4\ get form variable value const value = procesioform variables var1; 5\ set form variable value procesioform variables var1 = "value" where var1 is form variable name troubleshooting if you encounter issues with your form events check browser console for error messages and details verify javascript and form variables syntax for support, please join our discord community https //discord com/invite/cebukgjefv for further assistance and support
