Accordion repeater

  • Hi Folks

    I have a simple faq accordion template that uses a checkbox as the toggle to reveal the answer to a question (code below)

    1. <li>
    2. <input type="checkbox" id="faq-1">
    3. <label for="faq-1"><perch:content id="question" type="smarttext" label="Question" help="This will form the clickable question" required="true"/></label>
    4. <ul class="">
    5. <li>
    6. <perch:content id="answer" type="textarea" label="Answer" markdown="true" editor="simplemde"/>
    7. </li>
    8. </ul>
    9. </li>

    As you can see each checkbox input has an ID that matches its corresponding label.

    My question is how can I set this template up as a repeater that creates new sequential ID's?

    Any help would be appreciated otherwise it'll be the dreaded codeblock =O

    Many thanks!


  • drewm

    Approved the thread.
  • Post by Clive Walker ().

    This post was deleted by the author themselves ().