A suggest box is a text box or text area that displays a preconfigured set of selections that match the user's input. Suggest boxes are useful when there are too many choices to present to the user—so many that a select box would be unreasonable. It is also appropriate when the user can use an arbitrary string, but you want helpful suggestions to be available.
To add/delete/modify a suggest box
Inferred values incorporate well with suggest boxes. If you are using an inferred value script, have the script return the <suggest-box> root element and all its children.
Viewpoint uses its built-in intelligence engine to determine how many options are sent to the client when the form is created. If there are too many suggestions to send to the client, Viewpoint caches the suggestions on the server and passes more to the client when necessary.
<component id="manager-names" required="false"> <description>Select Team Lead</description> <suggest-box> <suggestion>Kelly Michaelis</suggestion> <suggestion>Larry Craig</suggestion> <suggestion>Elliott Johnson</suggestion> <suggestion>Harrison Carodine</suggestion> <suggestion>Bradley Kadanson</suggestion> </suggest-box> </component>
<component id="dynamic-names" required="false"> <description>Dynamic</description> <suggest-box dynamic="true" source="exec"> <url value="file:///home/user/tools/suggestions.pl" /> </suggest-box> </component>
The script outputs suggestions based on submitted outputs. The single argument to the script is the value of the current text. If "Jane" is submitted as input, it gets passed to suggestions.pl.
Related topics