[RSS Feed/News] Is it possible to access form input values in Entity's _preSave() function?

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
The use case is such that I need to modify the incoming form input value before storing it in the column. For example:

HTML:

<xf:dateinput name="start_date" value="{{ date($xf.time, 'Y-m-d') }}" />

PHP:

Code:
function _preSave()
{
    if($this->update())
    {
        $this->starts_in = <grab the start_date value here and convert to UTC>
    }
}

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom