Can't get my php script to display results on same page

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
harleyquinn
Forum Members
Forum Members
Posts: 36
Joined: Fri Dec 22, 2006 4:29 pm

Can't get my php script to display results on same page

Post by harleyquinn »

I'm using this form mailer script from http://www.dagondesign.com/articles/secure-php-form-mailer-script/. The only way I could get it to work was by creating a UDT (user defined tag) which would call it from an external php file. (I tried putting the whole script in a UDT, but kept getting a 403 error message, also tried using {literal}{/literal} and even tried enabling {php} in the config file, but those methods didn't work either.)

Anyway, I was able to get the script to work, but the only problem I'm having is that I can't figure out how to get it to display the results on the same page where I placed the UDT calling the script. So for instance, after someone fills out the contact form and hits the submit button, it should display either an error message or a thank you message on the same page, http://www.domainname.com/contact/, but instead displays the message on the external php page [url=http://www.%20domainname.com/formmailerscript.php]http://www. domainname.com/formmailerscript.php[/url].

Any ideas? Has anyone else ever use this form mailer script from http://www.dagondesign.com/articles/secure-php-form-mailer-script/? Any insight would be greatly appreciated.
JohnnyB
Dev Team Member
Dev Team Member
Posts: 731
Joined: Tue Nov 21, 2006 5:05 pm

Re: Can't get my php script to display results on same page

Post by JohnnyB »

For some reason, the dagon site is down...  But, I've used that php form in another (non cmsms) project -- the wordpress version that is available.

Most likely, the source code of the php form will have to be modified. 

I strongly recommend using the Form Builder module that is available for CMS MS.  It is a great module with a lot of flexibility and customization.  It took a little time to wrap my head around the method to create and then build the form fields, but was easy to use afterwards.  I built my own template for the form and it the module provides everything needed to build a custom template.

http://dev.cmsmadesimple.org/projects/formbuilder
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo

--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
harleyquinn
Forum Members
Forum Members
Posts: 36
Joined: Fri Dec 22, 2006 4:29 pm

Re: Can't get my php script to display results on same page

Post by harleyquinn »

I tried the Form Builder module and I couldn't for the life of me style the layout of the form. I too had a hard time wrapping my head around creating the template layout and then styling it with css. Got frustrated and ended up using the script from DagonDesign only because I've used it in the past and had success with it. I will give Form Builder a try once again.

Thanks.
Post Reply

Return to “CMSMS Core”