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

Dynamic forms with repeated elements don't run JS when a noSubmitButton is pressed

    XMLWordPrintable

Details

    Description

      When using a dynamic form that uses repeat_element() function in moodleforms and requires an AMD module to be loaded, the module is only loaded, when the form is initially loaded. When one clicks on a noSubmitButton (e.g. for adding new repeated elements), the AMD module is not loaded.

      Steps to reproduce:

      1. Install block_floatingbutton on Moodle 4.2 (https://github.com/mebis-lp/moodle-block_floatingbutton, branch MOODLE_402_STABLE)
      2. Add a block instance in a course.
      3. Go to the edit page of the block (opens in a new modal).
      4. Confirm you see a circle right of the "Icon" label.
      5. Click "Add more icons".
      6. Confirm you see a text input field right of the "Icon" labels (expected behavior would be to see the circle again).

      Attachments

        Activity

          People

            stefan.hanauska Stefan Hanauska
            stefan.hanauska Stefan Hanauska
            PhMemmel PhMemmel
            Jun Pataleta Jun Pataleta
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 59 minutes
                59m

                Clockify

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