Skip to content

Commit

Permalink
Merge branch 'MDL-64324-master' of https://github.com/marinaglancy/mo…
Browse files Browse the repository at this point in the history
  • Loading branch information
sarjona committed Jan 22, 2019
2 parents 0bf5dd4 + 4bfcadb commit 507d7ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/formslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1534,7 +1534,8 @@ public function __construct($formName, $method, $action, $target='', $attributes
// No 'name' atttribute for form in xhtml strict :
$attributes = array('action' => $action, 'method' => $method, 'accept-charset' => 'utf-8') + $target;
if (is_null($this->getAttribute('id'))) {
$attributes['id'] = 'mform' . $formcounter;
// Append a random id, forms can be loaded in different requests using Fragments API.
$attributes['id'] = 'mform' . $formcounter . '_' . random_string();
}
$formcounter++;
$this->updateAttributes($attributes);
Expand Down

0 comments on commit 507d7ec

Please sign in to comment.