5

if you have v 2.10 - try to replace <input type="hidden" name="XID" value="{XID_HASH}"> with <input type="hidden" name="csrf_token" value="{CSRF_TOKEN}"> The XID constant is deprecated starting from 2.8.0


3

It's going to be a little more manual with expressionengine. You might have to set the parameters in the link yourself and use php (or a plugin) Build the link similar to this: <a href="/form?name={name}">{name}</a> and fill out your form using php (php must be enabled on the form template): <input type="text" name="name" value="<?php ...


3

I believe you're running into problems with the parse order. When you add quotes, recipients becomes a valid parameter but it isn't parsed yet. When you remove the quotes, it becomes an invalid parameter and is ignored. You should be able to add parse="inward" to the contact_form parameters to parse recipients first. {exp:email:contact_form charset="...


3

There is a contact form bundled with ExpressionEngine: https://docs.expressionengine.com/latest/add-ons/email/contact_form.html


3

I've looked through the source code for you but I'm drawing a blank. I thought there was an arbitrery timeout value in the token however in 2.9.2 this seems to have been depreciated (or I imagined it)! I'm also going to assume the error is not a missing XID/CSRF_token as this has been covered above and no answer is forth-coming. First Question : How are ...


2

There is also a free version of Freeform. https://solspace.com/expressionengine/freeform


2

The answer to this question turns out to be a lot simpler than once though. Looks like the main issue was that I didn't have two hidden required fields included: <input type="hidden" name="from" value="" /> <input type="hidden" name="subject" value="Email Contact" /> For some reason this caused my form to malfunction.


1

OK, I just solved this. I've got 2 urls, one redirects to the other. Base path was set wrong in URL and path settings (set to the redirecting url) Works fine once I updated the settings.


1

check your general config settings. Are you removing the index.php file? When it gets stuck here: http://sxps.co.uk/?ACT=22 Try changing it to: http://sxps.co.uk/index.php?ACT=22 or set index.php as the site's index page in general config. If that runs, then we know FreeForm is running. Then we can look elsewhere.


1

The Email module doesn't know what to do with arbitrary POST data, it can only recognize fields that it is looking for. To build an email from multiple fields, use only the message field, but as an array. e.g.: <input type="text" name="message[]" /> <textarea name="message[]"></textarea>


1

I'm not exactly sure how the above answer would have worked, I'm really not sure I understood it. :/ However, I was able to accomplish what I wanted pretty easily with Solspace's Freeform. Also I needed custom fields which Freeform is great at doing. Also I need to mention Solspace has awesome support.


1

If you look at the Template Parsing order, you will see that segment variables are parsed before Preload Replace Variables. You can take advantage of that. {if segment_2 == "foo"} {preload_replace:pr-recipient="contact@foo.com,"} {if:elseif segment_2 == "bar"} {preload_replace:pr-recipient="sales@bar.com,"} {/if} {preload_replace:pr-recipient=""...


1

There's also another possibility that I ran into with the "This form has expired. Please refresh and try again." error. Using Stash, I recently turned on caching on my pages that include forms. The issue here is that the the CSRF token from a previous user is cached in this scenario. This created the error on every page including a submitted form. It was a "...


1

safest bet would be to use a service such as sendgrid. Mail sent from hosting servers has a tendency to be either blocked or marked as spam by conservative services such as exchange


1

The Email Contact Form doesn't support custom fields other than the defaults of: From To Subject Name Message Captcha By the looks of your example you're looking to include a lot more than that. Solspace Freeform is a popular option but there are other notable options which may be a better fit for your needs including DevDemon Forms and ProForm. They're ...


Only top voted, non community-wiki answers of a minimum length are eligible