0

I have set up a simple contact form on a new installation of Expression Engine 5.2. Email module is installed. This submits ok on localhost but on the server I am getting hit with the titular error.

enter image description here

My code:

                    {exp:email:contact_form [email protected]" charset="utf-8" form_class="iwd-standard-form"}

                    <fieldset class="iwd-fieldset-contained">
                        <legend>Your contact details</legend>
                        <div class="iwd-form-row">
                            <div class="iwd-form-labels">
                                <label for="name">*Name:</label>
                            </div>
                            <div class="iwd-form-controls">
                                <input name="name" placeholder="Your name" type="text">
                            </div>
                        </div>
                        <div class="iwd-form-row">
                            <div class="iwd-form-labels">
                                <label for="from">*Email:</label>
                            </div>
                            <div class="iwd-form-controls">
                                <input name="from" placeholder="Your email" type="text" value="" />
                            </div>
                        </div>
                    </fieldset>
                    <fieldset class="iwd-fieldset-contained">
                        <legend>Leave us a message</legend>
                        <div class="iwd-form-row">
                            <div class="iwd-form-labels">
                                <label for="message">Message:</label>
                            </div>
                            <div class="iwd-form-controls">
                                <textarea name="message" placeholder="Enter message" style="height:200px"></textarea>
                            </div>
                        </div>
                    </fieldset>

                    <fieldset class="iwd-fieldset-uncontained">

                        <div class="iwd-form-row center">
                            <input type="hidden" name="csrf_token" value="{csrf_token}">
                            <button id="form-submit" type="submit" class="iwd-button submit-form">Submit</button>
                        </div>
                    </fieldset>

                {/exp:email:contact_form}

1 Answer 1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.