Clear Selected Options from multiselect

Home Forums Cascading dropdowns Clear Selected Options from multiselect

Viewing 2 reply threads
  • Author
    Posts
    • #34875
      Bryan Waldrop
      Participant

        How do you programmatically clear all selected options from a cascading drop down multiselect?

        I want to do this in the new form before save if the option for making the available option appear is unselected.

        Thank you!

      • #34880
        Alexander Bautz
        Keymaster

          Not sure what you mean, but to clear the hidden field that holds the values you use this function:

          setFieldValue("Name_of_field", "");

          This will not clear the “visible” selected values, but the value that is saved will be empty.

          Alexander

        • #34881
          Bryan Waldrop
          Participant

            Thank you!

            I also found this solution to clear visible selections:

            $("#Selection2_casc").empty();

            Where my field name is Selection2

            • This reply was modified 3 years, 2 months ago by Bryan Waldrop.
        Viewing 2 reply threads
        • You must be logged in to reply to this topic.