/
How to: Add subtext to a Lookup/Text/Numeric Control
How to: Add subtext to a Lookup/Text/Numeric Control
Lookups and text/numeric controls have a unique and useful property called subtext. Subtext is a property that displays a helpful message as text below the field. This text may also be used to add a hyperlink or simply to inform the user of the status of a field, and even provide dynamic information based on value or key values from a lookup.
Step-by-step guide
- To enable this property start by selecting Module, followed by selecting the Module Name.
- Select the Forms tab, followed by the Field List button "Create/Update Fields...".
- Using the filter at the top of the Master field list, search for the relevant Lookup Control.
(Example - "customLookup1" -or- "customString1" -or- "customNumeric1") - After selecting the field from the list, select the Custom JavaScript tab.
- Within the init and/or blur fields paste the JavaScript below to enable the subtext and define a message to be shown.
(Replace the <FieldSystemNameHere> with the Fields actual System Name)
var field = fieldScope.getColumnFromDisplay("<FieldSystemNameHere>");
field.showSubtext = true;
field.subtext = "Your SubText Here";
(Note - This message can include any field value tied to the request, in the format ("Title:" + formScope.formdata.customString1 + "Additional text") - Open the form and verify that the subtext is accurately displayed on the relevant field.
How to Clear Subtext
field.subtext = "";
Related articles
, multiple selections available,
Related content
How to: Override displayed column for Lookup Field
How to: Override displayed column for Lookup Field
More like this
How do I concatenate fields in a lookup?
How do I concatenate fields in a lookup?
More like this
How do I create lookup list fields?
How do I create lookup list fields?
More like this
How to: Add custom scripted functionality to a form using a Button
How to: Add custom scripted functionality to a form using a Button
More like this
How do I customize text entry fields?
How do I customize text entry fields?
More like this
How do I show the name of the item and its description in a dropdown?
How do I show the name of the item and its description in a dropdown?
More like this