Moodle

Broken checkbox labels when using formslib's repeat_elements()

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Won't Fix
  • Affects Version/s: 1.9.5
  • Fix Version/s: None
  • Component/s: Forms Library
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE

Description

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.

Activity

Hide
Michael de Raadt added a comment -

Thanks for reporting this issue.

We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported.

If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

Michael d;

lqjjLKA0p6

Show
Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d; lqjjLKA0p6
Hide
Michael de Raadt added a comment -

I'm closing this issue as it appears to have become inactive and is probably not relevant to a current supported version. If you are encountering this problem or one similar, please launch a new issue.

Show
Michael de Raadt added a comment - I'm closing this issue as it appears to have become inactive and is probably not relevant to a current supported version. If you are encountering this problem or one similar, please launch a new issue.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: