More in this section

Forums / Developing with Sitefinity / Checking radio buttons in widget designer with jQuery

Checking radio buttons in widget designer with jQuery

1 posts, 0 answered
  1. Jason
    Jason avatar
    0 posts
    07 Sep 2016
    06 Mar
    Link to this post

    I have 4 radio buttons that I am using to select whether a button is linked to a page, URL, file, or nothing.  I have a hidden HTML element that saves which radio button is selected, and ideally when the designer is opened I would like to have the radio button that was last selected, be re-selected when the designer is loaded.

    However, I can't possibly seem to get the radio button checked. I'm trying to use the tried and true jQuery statement in refreshUI:

    $('#' + this.get_selectedRadioButton).prop('checked', true);

    But it is not throwing any errors, checking the button, or doing much of anything. I know for a fact that 'this.get_selectedRadioButton' spits out the correct ID of the correct radio button.

    I ask here because every other ASP.NET application I have used this on works, and I'm not sure if this is something that needs to be implemented differently in order to work correctly in Sitefinity.

    Thank you!




1 posts, 0 answered