Permalink
Browse files

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

…ements
  • Loading branch information...
1 parent eddceb6 commit 66653a52b0947b430d5432247b68bd690742cd4d @rajeshtaneja rajeshtaneja committed May 2, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/formslib.php
View
@@ -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.