-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
email body as text area #453
base: 8.x-3.x
Are you sure you want to change the base?
Conversation
@@ -21,6 +21,7 @@ class ContextDefinition extends ContextDefinitionCore implements ContextDefiniti | |||
'multiple' => 'isMultiple', | |||
'required' => 'isRequired', | |||
'default_value' => 'defaultValue', | |||
'form_element' => 'formElement', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You haven't added 'formElement'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'formElement' is at src/Plugin/RulesAction/SystemSendEmail.php
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not that I can see. You need something like:
/**
* Type of form element to be used.
*
* @var string
*/
protected $formElement = 'textfield';
ContextDefinition::toArray() is trying to set ContextDefinition::$formElement and it doesn't exist yet.
Issue #2724129 by yanniboi: Added to ContextDefinition for rules contexts.
… Context Definition property.
Almost there! I tested with simplytest.me and found that the email message still wasn't a textarea. After looking it turns out that the problem was that $formElement is a protected variable so ContextFormTrait cant use it directly. I have create a fix for this here: AntonMartyniuk#2 |
Issue #2724129 by yanniboi: Update
* Determines form element for the context type. | ||
* | ||
* @return bool | ||
* Type of form element to be used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return type is wrong, this should be "string", right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add an example, '... , for example "textarea".'
Make text body field as text area