Form processing error

I have created a form, made it a server connect form, added the necessary set up mailer, send mail, saved the action file

When I test the form by filling in the fields and hit send the form is emailed successfully
BUT the webpage goes to what looks like an error page showing

I have removed the form I created and inserted a form block, saved it all etc but still get the same result.

What am I doing wrong?

Hi Cliff,
Can you provide a link to your page please?

http://www.glendynehotel.co.uk

Can you please select your button and in the properties panel set its type to Submit?

Hi Teodor,

I’ve done that but still get the same result.

the test email you sent has come through ok

I see something strange on your page.
The browser component tag is wrapping your whole content:


    <div is="dmx-browser" id="browser1">
      <div id="fb-root"></div>
      <main>
       .......
      </main>
    </div>

which probably causes this problem. The component should not be used like that - please move the closing div tag from after the </main> to immediately after the <div is="dmx-browser" id="browser1"> so your code becomes:

      <div is="dmx-browser" id="browser1"></div>
      <div id="fb-root"></div>
      <main>
       .......
      </main>

Teodor, you are my hero. Thank you.

Can I ask for some more help? I have put back the form I want to use and it is sending to email. yippee! I need to put in the validation rules but before I do that the check box response is not being sent to the email. In the server actions properties it is set as Type Text. Is this correct or should it be something else such as Object?

Your checkbox doesn’t have a value:

<input class="form-check-input" type="checkbox" value="" id="input4" name="checkbox">

Add some value and when you bind the POST variable in the mail body it will be shown there.

That is now working.

I have recaptcha in the form and in server actions action steps have added it into catch.
however I can send the form without doing the recaptcha.
Now what am I doing wrong? ( have the correct public and private keys entered )

Your recaptcha step must be located before any other steps in the server action (not in a catch step).

That seems a bit counter intuitive. I have moved it to being the first item under Steps and the form won’t send without completing the recaptcha on the webpage. So, now doing what it should.

Thank you so much for your help and your patience.
Cliff

1 Like

The recaptcha step must be before any other step in your server action, as this is how server connect works - every step is executed after the completion of the previous one.

So the recaptcha must be at the first place.