General developer forum

Remove element button for repeat_elements

 
Picture of Bryan De Oliveira Brettas
Re: Remove element button for repeat_elements
 

Hi, David Poly.

I'm trying to do something very similar to what you''ve done.

How did you implemented it ?

An example of my code :

-- Code

$this->questions[] = $mform->createElement('button', 'deletequestion', get_string('question_remove', 'mod_mymod'), 0);

$mform->registerNoSubmitButton('deletequestion');

-- end Code

I just want to remove 'question's created with the 'Add' button implemented by 'repeat_elements' method.


Thanks.

 
Average of ratings: -