Version: current

     1 <?php
     2 /**
     3  * Data received from a UserDefinedForm submission
     4  *
     5  * @package userforms
     6  */
     7
     8 class SubmittedFormField extends DataObject {
     9
    10     static $db = array(
    11         "Name" => "Varchar",
    12         "Value" => "Text",
    13         "Title" => "Varchar(255)"
    14     );
    15
    16     static $has_one = array(
    17         "Parent" => "SubmittedForm"
    18     );
    19
    20     /**
    21      * Generate a formatted value for the reports and email notifications.
    22      * Converts new lines (which are stored in the database text field) as
    23      * <brs> so they will output as newlines in the reports
    24      *
    25      * @return String
    26      */
    27     function getFormattedValue() {
    28         return nl2br($this->dbObject('Value')->ATT());
    29     }
    30 }
    31

[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -