Hooking up a Suggester - a component with hints
Suggester It is a special type of external data source used mainly for text fields. Its task is to suggest or automatically correct the value entered by the user, according to a defined algorithm. The Suggester works on the server side – when the user enters data and leaves the field, the suggester service can, for example, modify that value (enforcing a specific format, range, etc.) or suggest another one.
Step-by-step configuration:
Selecting a component: You need to select a component of type Text field (TextField), for which the suggestion or correction mechanism is to be enabled.
Selecting the suggester: In the Properties panel, you need to go to the Interactions section. In the field External data source you need to click Select a service, and then from the list of available sources select the appropriate Suggester. After connecting, the suggester identifier should appear in the field (e.g. its name).
Automatic value update: In the Other properties section of the text field, you need to select the option Automatic value update (autoServerUpdate). This setting causes the value to be sent to the server after each completion of field editing (e.g. after leaving the field or losing focus). Thanks to this, the suggester receives the value entered by the user and can return a possibly modified one. If the autoServerUpdate option is not enabled, the suggester will not work – changes to the field value will not be recorded on the server side.
Completion of configuration: After completing the configuration, save the changes. From that moment on, the text field will be linked to the Suggester. When the user enters a value and finishes editing it (e.g. moves to the next field), the suggester mechanism will process the entered value. If it requires correction, the system will automatically replace it with the suggested one (e.g. increase it to the minimum allowed value). The Suggester can also display messages to the user – for example, information about the correction made.
Adjustment of messages: If the suggester has default messages (e.g. in English), it is worth translating them into Polish. To do this, go to the Translations tab in the request editor and find the message keys associated with the given Suggester. Then add the appropriate translations into Polish.

Demo request: demoSuggester
Last updated
Was this helpful?
