P/T ContactForm Retrieving Custom fields Value after submitting form 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:

&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;`


Example that doesn't work (custom fields):

&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;


Is it possible to retrieve custom field values after submitting the form?
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:

&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;