<p>The <code>recipientsEmail</code> field should be an <code>Email</code> fieldtype, and in Composer you need to set the notification template in the <strong>Field Property Editor</strong> column (on right) for that field and it'll send an email to the email that is entered in that field when the form is submitted. :)</p>

<p>View the documentation page here for more information about email notification options:
<a href="https://solspace.com/craft/freeform/docs/email-notifications/" rel="nofollow noreferrer">https://solspace.com/craft/freeform/docs/email-notifications/</a></p>

CC BY-SA 3.0
2017-03-02T17:17:49.787Z
Gah, I didn't realize I could do that! Thanks!
Christopher Kennedy-Nuñez
CC BY-SA 3.0
2017-03-02T16:41:22.367Z
2017-03-02T20:36:29.387Z
2017-03-02T20:36:29.387Z
Solspace
<p>I'm trying to build a "send this page to a friend" form in Freeform. My code looks like this:</p>

<pre><code>{% set form = craft.freeform.form("emailToAFriend") %}

{{ form.renderTag({returnUrl: "contact/success"}) }}

    {% if form.hasErrors %}
        &lt;div class="freeform-form-has-errors"&gt;
            {{ "There was an error submitting this form"|t }}
        &lt;/div&gt;
    {% endif %}

    {% set recipientsName = form.get("recipientsName") %}
    {% set recipientsEmail = form.get("recipientsEmail") %}
    {% set yourName = form.get("yourName") %}
    {% set yourEmail = form.get("yourEmail") %}
    {% set sharedUrl = form.get("sharedUrl") %}
    {% set message = form.get("message") %}

    &lt;label&gt;{{ yourName.label }}&lt;/label&gt;
    &lt;input name="{{ yourName.handle }}" value="{{ yourName.value }}" /&gt;
    {{ yourName.renderErrors() }}

    &lt;label&gt;Your Email Address&lt;/label&gt;
    &lt;input name="yourEmail" /&gt;
    {{ form.get("yourEmail").renderErrors() }}

    &lt;label&gt;{{ recipientsName.label }}&lt;/label&gt;
    &lt;input name="{{ recipientsName.handle }}" value="{{ recipientsName.value }}" /&gt;
    {{ recipientsName.renderErrors() }}

    &lt;label&gt;Their Email Address&lt;/label&gt;
    &lt;input name="recipientsEmail" /&gt;
    {{ form.get("recipientsEmail").renderErrors() }}

    {{ message.renderLabel() }}
    {{ message.renderInput() }}
    {{ message.renderErrors() }}

    &lt;button type="submit"&gt;Submit&lt;/button&gt;

{{ form.renderClosingTag }}
</code></pre>

<p>How could I get the field in <code>recipientsEmail</code> to pass to that recipient and choose the template?</p>

<plugin-freeform>
Send freeform email notification to manually entered recipient address
# Send freeform email notification to manually entered recipient address

(Asked by: username_0 on 2017-03-02)

I'm trying to build a "send this page to a friend" form in Freeform. My code looks like this:
{% set form = craft.freeform.form("emailToAFriend") %}

{{ form.renderTag({returnUrl: "contact/success"}) }}

    {% if form.hasErrors %}
        
            {{ "There was an error submitting this form"|t }}
        
    {% endif %}

    {% set recipientsName = form.get("recipientsName") %}
    {% set recipientsEmail = form.get("recipientsEmail") %}
    {% set yourName = form.get("yourName") %}
    {% set yourEmail = form.get("yourEmail") %}
    {% set sharedUrl = form.get("sharedUrl") %}
    {% set message = form.get("message") %}

    {{ yourName.label }}
    
    {{ yourName.renderErrors() }}

    Your Email Address
    
    {{ form.get("yourEmail").renderErrors() }}

    {{ recipientsName.label }}
    
    {{ recipientsName.renderErrors() }}

    Their Email Address
    
    {{ form.get("recipientsEmail").renderErrors() }}

    {{ message.renderLabel() }}
    {{ message.renderInput() }}
    {{ message.renderErrors() }}

    Submit

{{ form.renderClosingTag }}

How could I get the field in recipientsEmail to pass to that recipient and choose the template?

**Tags:** plugin-freeform

---

## 1 answers

### Answer by username_1 on 2017-03-02. Score: 2 | Accepted answer

The `recipientsEmail` field should be an `Email` fieldtype, and in Composer you need to set the notification template in the **Field Property Editor** column (on right) for that field and it'll send an email to the email that is entered in that field when the form is submitted. :)

View the documentation page here for more information about email notification options:
<https://solspace.com/craft/freeform/docs/email-notifications/>

> **Comments:**
> **username_0**: Gah, I didn't realize I could do that! Thanks!  

---

