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

FormApi addElement('static', ...) missing $attributes

XMLWordPrintable

    • MOODLE_405_STABLE

      the following code does not work:

      $mform->addElement('static', 'rpd_link', 'Link to RPD', ['class'=>'hidden']);

      although the same select works fine:

      $mform->addElement('select', 'template_code', 'template', helper::getRequestTemplates(), ['class'=>'hidden']);

      This happens because the fourth parameter $attributes is missing from the description of the HTML_QuickForm_static class constructor
      although the parent class HTML_QuickForm_element allows accepting $attributes

            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 - 28 minutes
                28m

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