I am populating the radio buttons based on a look up rule.
So first I write the value from the database to a hidden field - q2 and using Javascript I populate the radio button - #Field5 value.
Now if the radio button value is '2' it should display a multiline field - #Field10.
Field Rules are not working here. So I am using the Javascript. The code works till where it is writing to the multiline field with the value. But it doesn't show or hide the field. Am I supposed to have a click event?
//Populate Radio Buttons based on Hidden field value
$('#q2 input').change( function() {
$("#Field5").find($('input[value="' + $('#q2 input').val() + '"]')).attr("checked", true);
if ($('#q2 input').val() == "2") {
$("#Field10").val("2");
$('#q10').show();
} else {
$('#q10').hide();
}
});