NSOA.form.getLabel(field)
Use this function to get the label the user sees for a field on the OpenAir form.
Parameters
-
field {string} [required] — The name of the field on the form.
Note:This is not the label the user sees displayed next to the field on the form. Use the Form Schema to find the correct field name value.
Returns
-
The text value the users sees for specified field.
Note:Some fields return an object. See Object Fields for more details.
Units Limit
-
1 unit
For more information, see Scripting Governance.
Since
-
August 17, 2013
Example
-
This example gets the label for the date field on the form the script is attached to.
var receiptDateLabel = NSOA.form.getLabel('date');
-
This example gets the label for a field that returns an object. See Object Fields for more details.
// 'Primary loaded cost ' for the first row var label = NSOA.form.getLabel('loaded_cost')[0].cost_0;
See Code Samples for more examples.