mirror of
https://github.com/silverstripe/silverstripe-multiform
synced 2024-10-22 11:05:49 +02:00
Merge pull request #72 from creative-commoners/pulls/2.0/update-documentation
Update section 5 in the sample code to avoid HTML tags being escaped and rendered
This commit is contained in:
commit
d3c579440d
@ -203,6 +203,7 @@ template, we need to create a SurveyForm method (function) on the controller:
|
|||||||
|
|
||||||
```php
|
```php
|
||||||
use SilverStripe\CMS\Controllers\ContentController;
|
use SilverStripe\CMS\Controllers\ContentController;
|
||||||
|
use SilverStripe\ORM\FieldType\DBHTMLText;
|
||||||
|
|
||||||
class PageController extends ContentController
|
class PageController extends ContentController
|
||||||
{
|
{
|
||||||
@ -220,7 +221,7 @@ class PageController extends ContentController
|
|||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'Title' => 'Thank you for your submission',
|
'Title' => 'Thank you for your submission',
|
||||||
'Content' => '<p>You have successfully submitted the form!</p>'
|
'Content' => DBHTMLText::create('<p>You have successfully submitted the form!</p>')
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user