0

I've a choice field in a list form where multiple selection is enabled. I want to click a button (a custom one I've added) on selection of some options. How can this be achieved? Thanks in advance.

Regards, Korak

0

You can use JQuery for this purpose.

  $(document).ready(function () {
    $("#idoftheTableElementContainer input").each(function () {
        $(this).change(function () {
            //label next to checkbox holds the value. 
            if ($(this).next().val() == "random value") {
                $("#idofbutton").click();
            }
        });
    });
});

Make sure JQuery is referenced to the page.

  • It didn't work for me. I'm not sure if I'm entering the correct id for the checkbox. It looks like ctl00_m_g_a186c028_a2e3_485b_8545_63786566994a_ctl00_ListFieldIterator2_ctl05_ctl00_ctl00_ctl04_ctl00_ctl00 – Korak Jul 15 '16 at 11:07
  • Multiselect choice columns is rendered as a many check boxes inside a <table>. You have to get the id of the <table> element – Unnie Jul 15 '16 at 11:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.