Using the Update Mappings API

Field mappings are only updated at three separate times, on load, when changing forms, and on submission. This on occasion will not meet the requirements of a solution. Inserting the JS function, provided below, into an HTML form allows the developer to perform work modifying fields and trigger a mapping update afterwords.

 

//function must be named "hookInjector", and this function will be called once by FIM //after the form is finished loading all data. function hookInjector(obj) { //Work updating form fields //Note - in most cases after changing field values with JS, its required to //trigger an elemendataupdate for FIM to detect the changes. Forms_inMotion("elementdataupdate") //trigger field mapping update obj.fieldMap() }