I’m having trouble getting a contact form to run using formit.
I have setup the standard form from this link: link
When i submit a form on the contact page, it just refreshes the page and show the form with no feedback or redirect.
I’ve tried stripping validation, spam and recaptcha out of the form but still can’t get anywhere.
I was thinking maybe formit could be installed in the wrong directory on the server based on the config files as this has been a problem in the past but other extensions work just fine.
I’ve setup G suite smtp relay in modx settings and it works when i test it with Quick Mail.
Does it create any errors in the error log when you send the form with the email hook? A message like “An error occurred while trying to send the email.”?
As there seems to be a problem with sending emails you could try this:
Create a new snippet myemailhook with this code: (Change the email address in the code to your email address.)
This is very strange. The email hook basically does more or less the same. Maybe you could try to do some debugging to find out where the code fails, or reinstall the package and see if that helps.
As a last resort you can write your own snippet to send the email. Read the part about custom hooks in the documentation. Use
I’ve tried some debugging on the form. When i strip the form fields back to just the name field, the email sends using the ‘MyEmailChunk’ chunk. It includes the name input into the form.
The emails looks like this: mike [[+email]] [[+text]]
When i add fields into the form for email and text, it doesn’t come through.
This is the code for the form. I’m trying to find an error in the code but i can’t see anything. Any thouhgts?
I’ve just finished building a new site in modx on the same server and the contact form sends just fine. I think i’m going to install a fresh copy of Modx on another sever account and migrate it over. Hopefully that will fix it! i’ll keep you updated.
I’ve still not managed to get this working. I tried reinstalling modx on the server and just setting up the contact form on its own from scratch. Doesn’t work. I don’t understand why because on the same server on a different account, another website works without a problem with the same setup using goggle servers.
I’ve deleted the account on the server and am setting up a fresh Cpanel account now for it to see if that helps.
Maybe i’m missing something that can easily be fixed but i’m not that experienced with debugging things like this.
Finally it works. Deleting the Cpanel account in WHM and starting from scratch worked. I can’t give any more details as to why this is but it worked in the end. Thanks for your help