Skip to content
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

Open
wants to merge 6 commits into
base: 8.x-3.x
Choose a base branch
from

Conversation

AntonMartyniuk
Copy link

Make text body field as text area

@@ -21,6 +21,7 @@ class ContextDefinition extends ContextDefinitionCore implements ContextDefiniti
'multiple' => 'isMultiple',
'required' => 'isRequired',
'default_value' => 'defaultValue',
'form_element' => 'formElement',
Copy link
Contributor

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'.

Copy link
Author

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

Copy link
Contributor

@yanniboi yanniboi May 18, 2016

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.

yanniboi and others added 3 commits May 24, 2016 20:46
@yanniboi
Copy link
Contributor

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.
Copy link
Collaborator

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?

Copy link
Collaborator

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".'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants