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

Focus fails on form validation of required text fields

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 3.5.5, 3.6.3, 3.7
    • Fix Version/s: None
    • Component/s: Forms Library
    • Labels:
      None
    • Affected Branches:
      MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE

      Description

      The form validation code tries to focus on an element with an id of something like:

      id_error_message_5btext_5d
      

      The 5b/5d come from the escaping of [] characters to produce a reliable element name, so they're the first error.
      The second issue is that the field does not necessarily exist anyway.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dobedobedoh Andrew Nicols
                Reporter:
                dobedobedoh Andrew Nicols
                Participants:
                Component watchers:
                Jake Dallimore, Jun Pataleta, Ryan Wyllie
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: