Hello community, I am trying to create a field using API. Basically field should have a type of FieldtypeTextarea and InputfieldTinyMCE as inputfield. Here is my code :
/* Create new field using API */
$field = new Field();
// Set type as FieldtypeTextarea
$field->type = $this->modules->get("FieldtypeTextarea");
// Set inputfield as InputfieldTinyMCE. But no luck
$field->set('inputfield', 'InputfieldTinyMCE');
// Name of the field
$field->name = 'footer_region';
// Set label
$field->label = 'Footer region area';
// Save
$field->save();
Above code will create a new field with the type of FieldtypeTextarea. But it want assign InputfieldTinyMCE as the inputfield.
Any advise please
Thank you