Skip to content

Commit

Permalink
MDL-64906 forms: add support for hideif to repeat_elements
Browse files Browse the repository at this point in the history
  • Loading branch information
davosmith committed Apr 2, 2019
1 parent 0920f35 commit efc34ea
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/formslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1139,6 +1139,16 @@ function repeat_elements($elementobjs, $repeats, $options, $repeathiddenname,
$params = array_merge(array($realelementname), $params);
call_user_func_array(array(&$mform, 'disabledIf'), $params);
break;
case 'hideif' :
foreach ($namecloned as $num => $name){
if ($params[0] == $name){
$params[0] = $params[0]."[$i]";
break;
}
}
$params = array_merge(array($realelementname), $params);
call_user_func_array(array(&$mform, 'hideIf'), $params);
break;
case 'rule' :
if (is_string($params)){
$params = array(null, $params, null, 'client');
Expand Down

0 comments on commit efc34ea

Please sign in to comment.