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

FormAPI: hideIf function does not disable execution of rules on hidden elements

XMLWordPrintable

    • MOODLE_403_STABLE, MOODLE_404_STABLE, MOODLE_405_STABLE

      $mform->addElement('course', 'id_course', 'Course');
      $mform->addRule('id_course', 'Required', 'required');
      $mform->hideIf('id_course', 'template_code', 'neq', 'course');
       
      This bug leads to the fact that form elements are hidden and the user does not see them - however, the form does not pass validation and errors are not displayed - as a result, the user does not understand what is happening

      Solution: hideIf - should disable execution of validation rules on elements hidden by it

            Unassigned Unassigned
            алексей1 Алексей
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 16 minutes
                16m

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