protected function onBeforeDelete()
    {
        if ($this->Values()) {
            foreach ($this->Values() as $value) {
                $value->delete();
            }
        }

        parent::onBeforeDelete();
    }
protected function onBeforeDelete()
    {
        if ($this->Values()) {
            foreach ($this->Values() as $value) {
                $value->delete();
            }
        }

        parent::onBeforeDelete();
    }
protected function onBeforeDelete ( ) { if ( $ this -> Values ( ) ) { foreach ( $ this -> Values ( ) as $ value ) { $ value -> delete ( ) ; } } parent :: onBeforeDelete ( ) ; }
Before we delete this form make sure we delete all the field values so
that we don't leave old data round.

@return void
Before we delete this form make sure we delete all the field values so that we don t leave old data round .