Your cart is empty!
Configuration
public function getForm() : array
Returns the configuration fields of the action.
Description
This method is used to define the list of fields used by the configuration of the action.
The array to return should look like the following JSON representation.
{
"param_1": {
"type": "text",
"value": "abc",
"label": "Text Field"
},
"param_2": {
"type": "select",
"value": "one",
"label": "Dropdown",
"options": {
"one": "One",
"two": "Two",
"three": "Three"
}
}
}
Further details about all the supported fields can be found HERE.
Return Value
Array. An associative array containing the configuration form of the conditional text action.
Example
The example below explains how to support the fields mentioned in the article used to describe the apply
method.
/**
* @inheritDoc
*/
public function getForm()
{
return [
'sendermail' => [
'type' => 'email',
'label' => 'Sender e-mail',
'value' => $this->options->get('sendermail'),
],
'sendername' => [
'type' => 'text',
'label' => 'Sender name',
'value' => $this->options->get('sendername'),
],
'replyto' => [
'type' => 'email',
'label' => 'Reply-to e-mail',
'value' => $this->options->get('replyto'),
],
];
}
Last Update: 2023-12-29 14:15
Helpful?