Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-18T12:30:00.200Z
Answers.LastActivityDate: 2016-04-18T12:30:00.200Z
Answers.UserDisplayName: Jacob
Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-09T11:43:41.600Z
Answers.LastActivityDate: 2015-12-09T21:42:22.300Z
Answers.LastEditDate: 2015-12-09T21:42:22.300Z
Answers.UserDisplayName: William Isted
Body: <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>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-09-17T09:55:59.333Z
Comments.Text: Has there been any development on this? Struggling to access additional fields in submitted forms (eg on return from error).
Comments.UserDisplayName: Cole Henley
Tags: <form><plugin-contactform><custom>
Title: P/T ContactForm Retrieving Custom fields Value after submitting form
ThreadText: # 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:
  
  ```
  <label for="fromName">Name:*</label>
  <input id="fromName" type="text" name="fromName" value="{% if message is defined %}{{ message.fromName }}{% endif %}">`
  
  ```
  
  Example that doesn't work (custom fields):
  
  ```
  <label for="fromCompany">Company:</label>
  <input id="fromCompany" type="text" name="message[fromCompany]" value="{% if message is defined %}{{ message.fromCompany }}{% endif %}">
  
  ```
  
  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>
  
  ```
  <input id="fromCompany" type="text" name="message[fromCompany]" value="{% if message is defined %}{{ message.messageFields.['fromCompany'] }}{% endif %}">
  
  ```
  
  
  ---
  
  ### 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:
  
  ```
  <label for="fromCompany">Company:</label>
  <input id="fromCompany" type="text" name="message[fromCompany]" value="{% if message is defined %}{{ craft.request.getPost('message.fromCompany') }}{% endif %}">
  
  ```
  
  
  ---
  
  