diff --git a/src/Context/ContextDefinition.php b/src/Context/ContextDefinition.php
index 7122d6e..b04bea5 100644
--- a/src/Context/ContextDefinition.php
+++ b/src/Context/ContextDefinition.php
@@ -22,11 +22,19 @@ class ContextDefinition extends ContextDefinitionCore implements ContextDefiniti
     'multiple' => 'isMultiple',
     'required' => 'isRequired',
     'default_value' => 'defaultValue',
+    'form_element' => 'formElement',
     'constraints' => 'constraints',
     'allow_null' => 'allowNull',
     'assignment_restriction' => 'assignmentRestriction',
   ];
 
+  /**
+   * Type of form element to be used.
+   *
+   * @var string
+   */
+  protected $formElement = 'textfield';
+
   /**
    * Whether the context value is allowed to be NULL or not.
    *
@@ -117,4 +125,19 @@ class ContextDefinition extends ContextDefinitionCore implements ContextDefiniti
     return $this;
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function getFormElement() {
+    return $this->formElement;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setFormElement($form_element) {
+    $this->formElement = $form_element;
+    return $this;
+  }
+
 }
diff --git a/src/Context/ContextDefinitionInterface.php b/src/Context/ContextDefinitionInterface.php
index 118627c..f53b0e2 100644
--- a/src/Context/ContextDefinitionInterface.php
+++ b/src/Context/ContextDefinitionInterface.php
@@ -60,6 +60,25 @@ interface ContextDefinitionInterface extends ContextDefinitionInterfaceCore {
    */
   public function setAssignmentRestriction($restriction);
 
+  /**
+   * Determines form element for the context type
+   * e.g textarea.
+   *
+   * @return string
+   *   Type of form element to be used.
+   */
+  public function getFormElement();
+
+  /**
+   * Sets the form element for context.
+   *
+   * @param string $form_element
+   *   Type of form element to be used.
+   *
+   * @return $this
+   */
+  public function setFormElement($form_element);
+
   /**
    * Exports the definition as an array.
    *
diff --git a/src/Form/Expression/ContextFormTrait.php b/src/Form/Expression/ContextFormTrait.php
index 65aeacc..802e404 100644
--- a/src/Form/Expression/ContextFormTrait.php
+++ b/src/Form/Expression/ContextFormTrait.php
@@ -4,7 +4,7 @@ namespace Drupal\rules\Form\Expression;
 
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\rules\Context\ContextConfig;
-use Drupal\Core\Plugin\Context\ContextDefinitionInterface;
+use Drupal\rules\Context\ContextDefinitionInterface;
 use Drupal\rules\Context\DataProcessorManagerTrait;
 
 /**
@@ -52,7 +52,7 @@ trait ContextFormTrait {
       $default_value = $context_definition->getDefaultValue();
     }
     $form['context'][$context_name]['setting'] = [
-      '#type' => 'textfield',
+      '#type' => $context_definition->getFormElement(),
       '#title' => $title,
       '#required' => $context_definition->isRequired(),
       '#default_value' => $default_value,
@@ -61,6 +61,8 @@ trait ContextFormTrait {
     $element = &$form['context'][$context_name]['setting'];
 
     if ($mode == 'selector') {
+      // Always use a textfield for selector mode.
+      $element['#type'] = 'textfield';
       $element['#description'] = $this->t("The data selector helps you drill down into the data available to Rules. <em>To make entity fields appear in the data selector, you may have to use the condition 'entity has field' (or 'content is of type').</em> More useful tips about data selection is available in <a href=':url'>the online documentation</a>.", [
         ':url' => 'https://www.drupal.org/node/1300042',
       ]);
diff --git a/src/Plugin/RulesAction/SystemSendEmail.php b/src/Plugin/RulesAction/SystemSendEmail.php
index f0f6d9b..ad1b290 100644
--- a/src/Plugin/RulesAction/SystemSendEmail.php
+++ b/src/Plugin/RulesAction/SystemSendEmail.php
@@ -29,6 +29,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
  *     "message" = @ContextDefinition("string",
  *       label = @Translation("Message"),
  *       description = @Translation("The email's message body."),
+ *       form_element = "textarea",
  *     ),
  *     "reply" = @ContextDefinition("email",
  *       label = @Translation("Reply to"),
