mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
31 lines
620 B
PHP
Executable File
31 lines
620 B
PHP
Executable File
<?php
|
|
/**
|
|
* Data received from a UserDefinedForm submission
|
|
*
|
|
* @package userforms
|
|
*/
|
|
|
|
class SubmittedFormField extends DataObject {
|
|
|
|
static $db = array(
|
|
"Name" => "Varchar",
|
|
"Value" => "Text",
|
|
"Title" => "Varchar(255)"
|
|
);
|
|
|
|
static $has_one = array(
|
|
"Parent" => "SubmittedForm"
|
|
);
|
|
|
|
/**
|
|
* Generate a formatted value for the reports and email notifications.
|
|
* Converts new lines (which are stored in the database text field) as
|
|
* <brs> so they will output as newlines in the reports
|
|
*
|
|
* @return String
|
|
*/
|
|
function getFormattedValue() {
|
|
return nl2br($this->dbObject('Value')->RAW());
|
|
}
|
|
}
|