This topic is locked

reset a multiselect field

11/9/2023 4:23:49 PM
PHPRunner General questions
francesco author

I have a button that empties a multiselect field and it seems to work. This is the code I have in client Before:

$('#value_codice_1').val('').trigger('chosen:updated');

it empties the field as intended, but when I save the record, all previous values are recorded in fields. How can I reset a multiselect field in alternative way?

Sergey Kornilov admin 11/10/2023

Did you try the built-in Javascript API for this purpose?
https://xlinesoft.com/phprunner/docs/ctrl_setvalue.htm

francesco author 11/10/2023

i tried, built in api works good with single value fields. I will ask for support