Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-20441

Broken checkbox labels when using formslib's repeat_elements()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • None
    • 1.9.5
    • Forms Library
    • None
    • MOODLE_19_STABLE

      When using the repeat_elements function in formslib, the labels accompanying checkboxes are broken. They all refer to the first checkbox element of the repeated set.

      Clicking on the checkbox square works, but clicking on the label doesn't.

      The reason for this is that all checkboxes get the same "id" attribute, so the labels all refer to the first object with that ID (at least in Firefox).

      I have attached a simple fix which solves the problem for me, but I'd like someone well-versed in formslib to review it as it might have some unexpected effects.

            moodle.com Moodle HQ
            francois Francois Marier (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.