ACF use flexible layaout field inside repeater – returns empty value.
-
Hi, I need to get for every question radio buttons’ a id, so inside question is all with same id’s.
Is it possible to get inside repeater layout field [field question_id].
Or is there some another way’s to get inside repeater a id’s
I have tried simple $counter++ – but it don’t count as needed so all my questions radio buttons have a same id.[flex myflex] [layout mylayout] <li data-question="<?php do_short('[field question_id]');?>"> <h3>[field question]</h3> [repeater myrepeater] <input class="radio" name='radio-id' type="radio"> <input class="radio" name='radio-<?php do_short('[field question_id]');?>' type="radio"> [/repeater] </li> [/layout] [/flex]
The end result need’s to be like this.
<li class="question" data-question="1"> <h3>Question 1</h3> <input class="radio" name='radio-1' type="radio"> <input class="radio" name='radio-1' type="radio"> </li> <li class="question" data-question="2"> <h3>Question 2</h3> <input class="radio" name='radio-2' type="radio"> <input class="radio" name='radio-2' type="radio"> </li>
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘ACF use flexible layaout field inside repeater – returns empty value.’ is closed to new replies.