<p>I just came across this question, for the sake of up to date info for others, it is now possible to do this with the latest release(1.7) of the ContactForm plugin from Pixel &amp; Tonic:
<a href="https://github.com/pixelandtonic/ContactForm" rel="nofollow">https://github.com/pixelandtonic/ContactForm</a></p>

<pre><code>&lt;input id="fromCompany" type="text" name="message[fromCompany]" value="{% if message is defined %}{{ message.messageFields.['fromCompany'] }}{% endif %}"&gt;
</code></pre>

CC BY-SA 3.0
2016-04-18T12:30:00.200Z
2016-04-18T12:30:00.200Z
Jacob
<p>In <code>Craft 2.5</code> with <code>Contact Form 1.4</code> I'm receiving the same error when using:</p>

<pre><code>{% if message is defined %}{{ message.contactTel }}{% endif %}
</code></pre>

<p>I've gotten around this by using the Craft Request method <code>getPost</code> which can return a post value from an array. In the case of the original question, the following should work:</p>

<pre><code>&lt;label for="fromCompany"&gt;Company:&lt;/label&gt;
&lt;input id="fromCompany" type="text" name="message[fromCompany]" value="{% if message is defined %}{{ craft.request.getPost('message.fromCompany') }}{% endif %}"&gt;
</code></pre>

CC BY-SA 3.0
2015-12-09T11:43:41.600Z
2015-12-09T21:42:22.300Z
2015-12-09T21:42:22.300Z
William Isted
<p>I'm trying to retrieve custom fields value after submitting a form. Trying to access the custom fields through the message element after the form is submitted always throws an error  that the custom fields variable does not exist.</p>

<p>Example that works:</p>

<pre><code>&lt;label for="fromName"&gt;Name:*&lt;/label&gt;
&lt;input id="fromName" type="text" name="fromName" value="{% if message is defined %}{{ message.fromName }}{% endif %}"&gt;`
</code></pre>

<p>Example that doesn't work (custom fields):</p>

<pre><code>&lt;label for="fromCompany"&gt;Company:&lt;/label&gt;
&lt;input id="fromCompany" type="text" name="message[fromCompany]" value="{% if message is defined %}{{ message.fromCompany }}{% endif %}"&gt;
</code></pre>

<p>Is it possible to retrieve custom field values after submitting the form?</p>

CC BY-SA 3.0
2015-09-17T09:55:59.333Z
Has there been any development on this? Struggling to access additional fields in submitted forms (eg on return from error).
Cole Henley
<form><plugin-contactform><custom>
P/T ContactForm Retrieving Custom fields Value after submitting form
# P/T ContactForm Retrieving Custom fields Value after submitting form

(Asked by: username_0 on 2014-09-19)

I'm trying to retrieve custom fields value after submitting a form. Trying to access the custom fields through the message element after the form is submitted always throws an error  that the custom fields variable does not exist.
Example that works:
Name:*
`

Example that doesn't work (custom fields):
Company:


Is it possible to retrieve custom field values after submitting the form?

**Tags:** form, plugin-contactform, custom

> **Comments:**
> **username_1**: Has there been any development on this? Struggling to access additional fields in submitted forms (eg on return from error).  

---

## 2 answers

### Answer by username_2 on 2016-04-18. Score: 3 | Accepted answer

I just came across this question, for the sake of up to date info for others, it is now possible to do this with the latest release(1.7) of the ContactForm plugin from Pixel & Tonic:
https://github.com/pixelandtonic/ContactForm


---

### Answer by username_3 on 2015-12-09. Score: 3

In Craft 2.5 with Contact Form 1.4 I'm receiving the same error when using:
{% if message is defined %}{{ message.contactTel }}{% endif %}

I've gotten around this by using the Craft Request method getPost which can return a post value from an array. In the case of the original question, the following should work:
Company:


---

