Skip to content

Conversation

AntonMartyniuk
Copy link

Make text body field as text area

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