I’m hoping I can get some help with a problem I’ve been struggling with for a few days. I’m looking to maintain about 10 radio fields that can each be used many times over for a website that will include quizzes. All of the fields will have option values A, B, C, but the labels will vary depending on the quiz. I have one channel where the values will be saved for the users in a separate radio field, and another channel where the labels are in grid fields.
In my template, I have channel entry tags nested inside channel form tags. The answers are being saved properly, but I’m having trouble getting the labels to display correctly. If I have the code as below, it displays the label for option A 3 times, but the radio field saves correctly, depending on which button I select. If I remove the limit, everything repeats 3 times, but still save correctly if I select the 1st, 2nd, or 3rd option from any of the repeats.
Within the channel entry tags I have the following code, where ‘dp1_check’ is the field that holds the answers in the channel 'sd101_interact', and ‘decision_point_1:dp_option’ is column in the grid field with the labels in the channel 'sd101_decision_points'. The grid field also contains other columns related to the option selected, such as the feedback response for each option, the order (A/B/C), and the question. The grid has 3 rows, one for each option.
{exp:channel:form
channel="sd101_interact"
url_title="{logged_in_member_id}interact"
return="/…."}
{exp:channel:entries
channel="sd101_decision_points"
url_title="sd101fpd"
dynamic="no"}
{decision_point_1 limit="1"}
{options:dp1_check}
<input type="radio" name="dp1_check" value="{option_value}" {checked}>{decision_point_1:dp_option}<br>
{/options:dp1_check}<br>
{/decision_point_1}
{/exp:channel:entries}
{/exp:channel:form
Could someone give me an idea of how I can make this work, so it pulls the labels once for each option. I attempted an embed for the label, but it just displayed all 3 options for each radio button.
Thank you.