custom form in an html block
On submit the form will fill in the fields of pre-designed PDF form and send the pdf form by email to a predetermined address. I have designed and tested this to work on a non C5 site and it works. However when I copy and paste it into the HTML block it doesn't work. All paths seem to be set accurately and no mail is being generated according to the logs.
I feel like their is an error in the way that C5 sends mail but no errors have been reported in a php info page or C5 logs and it is not being received to the email address.
Is there some trick in how to add custom external calls to php files in the action submit of forms related to C5? Anyone have related experience or tips?
I have a sample contact form block that sends an email when filled out -- shouldn't be too hard to see how to modify it to suit your needs:
O, yes, duh. Is there a php block? Won't that work?
I'd take a look at jordan's block first since it's been tested in the c5 environment and won't cause any conflicts.
However, it still seems irrelevant. I should be able to put any html, js, css in a html block and it would work. Like I mentioned, I have tested this form outside of c5 and it works.
My point is that regardless if it works *outside* of concrete5 doesn't automatically mean it will *inside* when you view the page in edit mode.
If it's written properly then it shouldn't be a problem; it's just something to be aware of.
Finally, and this is the big one... while you should be able to make html/css/js work in the page, when the form is submitted it needs to GO somewhere -- you say you have a php file that handles that, but where is that php file? This is what is going to cause the most problems if you want that integrated into C5 somehow. On the other hand, if that php file is self-contained and does its own thing just fine, you could put it on a server somewhere and post directly to it (but note that any errors or messages it outputs will be outside of C5 and hence not in your site's theme).
Hope this sheds a little light on the complications involved. Best of luck.
> On the other hand, if that php file is self-contained and does its own thing just fine, you could put it on a server somewhere and post directly to it (but note that any errors or messages it outputs will be outside of C5 and hence not in your site's theme).
All of my code is valid, and my js does not conflict. I have tried placing the form's php script both on another host, and on the host of the site, in the root directory and in the theme directory. Every path is absolutely referenced. Still no success.
This is why I am now wondering if it could be a problem with my host. However, I do not know what it might be. As I said earlier my phpinfo page gave no indication of mail errors. This is why I am stumped!
Thank for the message ?