Hi all,
I am saving custom text fields in the CMS, what I mean by that is that where normally you'd have a DataObject with
private static $db = array(
'MyField' => 'Text'
);
And you then have
public function getCMSFields(){
...
TextField::create('MyField', 'Title of the field: ')
...
}
To add the fields to the form.
Well I am not using matching field names because I have custom save logic in place that saves the data some other way. So now I need to populate these textfields with data. Right now everytime you reload the CMS the fields are empty.
So what I'd like to to is
or:
TextField::create('MyCustomNameThatDoesNotMatch', 'Title of the field: ', 'Initial data that the user is editing')
or (what I see as feasable): Some method that returns me the Form instance of the CMS Form so I can use loadDataFrom on it to populate the fields with the data.
I really hope this is possible so I can continue working :)
Thank you all for reading this!