Quantcast
Channel: General developer forum
Viewing all articles
Browse latest Browse all 38395

Problems with a html editor field definition

$
0
0
by Carme Q.  

Hi,

I am implementing a plugin for Moodle 3 and in the mod_form.php I have the following code:

$mform->addElement('htmleditor', 'instructions', get_string('instructionsr','remotequiz'), 'rows="10" cols="20"');
$mform->setType('instructions', PARAM_RAW);

The html text editor functionality is ok (presenting the content of the field in the database and saving the changes in that field).

However the presentation of the field in the form does not changes when I change the rows and cols values.

I have read the

https://docs.moodle.org/dev/lib/formslib.php_Form_Definition

where it says that currently the definition of an html editor should be done by the code:

$mform->addElement('editor', 'instructions', get_string('instructionsr', 'langfile'));
$mform->setType('instructions', PARAM_RAW);

When I change the code, the presentation of the field is ok, but it does not has the correct functionality. It does not show the content of the field in the database nor saves the changes in the field in accepting changes in the form.

Someone could help me?

Carme


       


Viewing all articles
Browse latest Browse all 38395

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>