Get form field values in javascript execution block

From SMTX Wiki
Revision as of 12:36, 15 April 2024 by Smtxwiki (talk | contribs) (Created page with "Example function to retrieve a value from a simple field in a request form var getFormField (formvalues, fieldname) { formvalues.filter(function(fld) { return fld.internallabel === fieldname }).map(function(fld) { return fld.value; }).join(""); } var fieldValue = getFormField(g_forminstance.values, 'fieldname');")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Example function to retrieve a value from a simple field in a request form

 var getFormField (formvalues, fieldname) {
   formvalues.filter(function(fld) { return fld.internallabel === fieldname }).map(function(fld) { return fld.value; }).join("");
 }
 var fieldValue = getFormField(g_forminstance.values, 'fieldname');