Pre populate Hidden input from Radio Button Label

This is a jQuery snippet that will populate an input field with the html from a radio button label


// Get the html from the selected Event on the radio button and put it in the hidden field so we can access it in the pdf for the ticket
var selectedEvent = $(‘form input[type=”radio”]:checked’).parent().next().find(‘label’).html()

Leave a Reply