BigRed Posted January 19, 2023 Share Posted January 19, 2023 I'm trying to do something I thought was really simple but I'm obviously having a brain freeze on it. I have a form defined using HannaCode. I want the user to be able to fill out the form and have it be submitted to a PHP processing page for emailing results, etc. I had to put that response page in the root directory of the web server for this to work as Processwire won't let you use any PHP file without getting an error. The processing page is very simple, just for testing. No matter what I use on that page ($mail, WireMail, $pages->find, etc, etc). I get an error about an undefined variable. Am I doing something wrong here? The method for the form is post, the action is the processing PHP page. Link to comment Share on other sites More sharing options...
wbmnfktr Posted January 19, 2023 Share Posted January 19, 2023 This might be the right starting point for your question: https://processwire.com/docs/front-end/include/ Never used it, but it's possible to use ProcessWire outside of its natural space. 1 Link to comment Share on other sites More sharing options...
adrian Posted January 20, 2023 Share Posted January 20, 2023 5 hours ago, msavard said: I had to put that response page in the root directory of the web server for this to work as Processwire won't let you use any PHP file without getting an error. You might find this a better approach: https://processwire.com/blog/posts/pw-3.0.173/ 3 Link to comment Share on other sites More sharing options...
BigRed Posted February 2, 2023 Author Share Posted February 2, 2023 Thank you for that. It was the perfect solution and very easy. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now