Skip to content

Commit

Permalink
Merge branch 'MDL-78795-MOODLE_402_STABLE' of https://github.com/phme…
Browse files Browse the repository at this point in the history
…mmel/moodle into MOODLE_402_STABLE
  • Loading branch information
junpataleta committed Sep 7, 2023
2 parents 9242a03 + 5359b82 commit 278f3d6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/form/classes/external/dynamic_form.php
Expand Up @@ -77,6 +77,13 @@ public static function execute(string $formclass, string $formdatastr): array {

// Render actual form.

if ($form->no_submit_button_pressed()) {
// If form has not been submitted, we have to recreate the form for being able to properly handle non-submit action
// like "repeat elements" to include additional JS.
/** @var \core_form\dynamic_form $form */
$form = new $formclass(null, null, 'post', '', [], true, $formdata, true);
$form->set_data_for_dynamic_submission();
}
// Hack alert: Forcing bootstrap_renderer to initiate moodle page.
$OUTPUT->header();

Expand Down

0 comments on commit 278f3d6

Please sign in to comment.