Template function to format the selection after user chose an option
Signature:
Parameters:
- $js_format_function: JavaScript function to format the selection
Template function to format the selection after user chose an option
Signature:
Parameters:
Template function to format list of selections that user can select
Signature:
Parameters:
It’s easy to customize the dropdown with templates. Templating is done with format_results() method and a little bit Javascript.
The following example attaches country_flag to a Select tag. It formats the results using a Javascript function named “formatCountry” to add country flag images.
formatCountry is a Javascript function name.