You are viewing limited content. For full access, please sign in.

Question

Question

Fill radio buttons with variables from previous form

asked on March 3, 2020

Is there a way to have the radio button answers populate based off a variable from a previous form? I added the DataSet option, but it shows up blank, which tells me that it is sort of working (it recognizes the DataSet) but is leaving it blank instead of populating the buttons.

0 0

Replies

replied on March 3, 2020

Hi Justin, it would require JS to select/check one of the values in the Radio Button.

On the previous form, what type of field would the value be coming from?

0 0
replied on March 3, 2020

Just a single line field.

0 0
replied on March 3, 2020 Show version history

Hi Justin

#q3 - change to your Single Line Field
#q27 - change to your Radio Button

You could choose to use CSS Classes if you would prefer

The value in the Single Line field needs to be exact matches to the Radio Button Choices. This is based on the Single Line field already being populated when you open the task

$(document).ready(function () {
    var value = $('#q3 input').val();
    $('#q27').find($('input[value="' + value + '"]')).attr('checked', true)
    $('#q27').trigger.change
});

 

@SteveKnowlton

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.