Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-31498 formslib: repeat_elements will now set default for group el…

…ements
  • Loading branch information...
commit 66653a52b0947b430d5432247b68bd690742cd4d 1 parent eddceb6
@rajeshtaneja rajeshtaneja authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/formslib.php
View
4 lib/formslib.php
@@ -979,8 +979,8 @@ function repeat_elements($elementobjs, $repeats, $options, $repeathiddenname,
foreach ($options as $elementname => $elementoptions){
$pos=strpos($elementname, '[');
if ($pos!==FALSE){
- $realelementname = substr($elementname, 0, $pos+1)."[$i]";
- $realelementname .= substr($elementname, $pos+1);
+ $realelementname = substr($elementname, 0, $pos)."[$i]";
+ $realelementname .= substr($elementname, $pos);
}else {
$realelementname = $elementname."[$i]";
}

0 comments on commit 66653a5

Please sign in to comment.
Something went wrong with that request. Please try again.