How to add a paragraph on a plugin settings form?

How to add a paragraph on a plugin settings form?

by Lawrence Lagerlof -
Number of replies: 1

In my plugins' settings.php, I configured some fields like this:

$settings->add(new admin_setting_configtext('myplugin/field1', 'A label', '', '', PARAM_TEXT));

It's working, but now I need to add a paragraph before the first field. The only option I found was using:

$settings->add(new admin_setting_heading(...

but of course it's not right. A heading is an H, and I need a paragraph P.

Any insight?


Average of ratings: -
In reply to Lawrence Lagerlof

Re: How to add a paragraph on a plugin settings form?

by Lawrence Lagerlof -
The Moodle guys helped me. Here is a solution just in case someone stumble upon the same problem:

You can add a text using:

$settings->add(new admin_setting_description('myparagraph1', 'This text goes in the same column of field names (column 1). You can just put here an empty string if you wish.', '<p>This text goes in column 2. You probably want to put a large text here.</p>'));
Average of ratings: Useful (1)