templateResult with select 2 in metabox.io
-
hi, in the select advanced field (that uses select2 plugin) I can’t get the “templateResult” to work as a js_option (basically i’d like to display some basic html in my options the way it is recommended on the doc https://select2.org/dropdown#templating).
the code for this part (i did test that putting only the function name and creating the function on a separate js file… no luck either)
'js_options' => array( 'templateResult' => 'function(result){ return result.text + "<span>test</span>"; }' ),
any idea on ho to make that work ?
- The topic ‘templateResult with select 2 in metabox.io’ is closed to new replies.