Setting up a 'Contact' form in PivotX..

Discuss PivotX 2.0.x here. Non-PivotX related discussions go in The Drain.

Re: Setting up a 'Contact' form in PivotX..

Postby hansfn » Mon Mar 23, 2009 10:34 pm

Just set "allow_php_in_templates" to 1 in the advanced configuration to use PHP in the templates.
hansfn
Developer
 
Posts: 3280
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Setting up a 'Contact' form in PivotX..

Postby mbootsman » Wed Mar 25, 2009 12:33 pm

Bob,

thanks for this, really like it!!

UPDATE.
But, after installing and configuring, all I get is a form with none of the labels filled in. The test-form works perfectly, but including the form on a page doesn't give the desired response. Any hints where I need to look?
See screenshot at http://www.bootsman.org/contact.jpg

UPDATE2, I'm in contact with Mike, but he has no clue either at this point...
mbootsman
 
Posts: 89
Joined: Tue Apr 29, 2008 7:09 am

Re: Setting up a 'Contact' form in PivotX..

Postby mbootsman » Thu Mar 26, 2009 8:48 am

Ready for another day of debugging. :lol:

It seems that using include_once("form.php"); doesn't produce anything, and include("form.php"); gives me the empty form as shown in the post above. So following the guidelines from Bob, I don't get a form at all. Including PHP works, tried that with a
Code: Select all
[[ php ]] echo "test"; [[ /php ]]
which just works.

I have reinstalled Pivot, reinstalled the form code. And I'm really ready to pull my hair out.... :|

UPDATE:
Because I am running this on my own server, I decided to test on the server of my hoster, for another site I have. And what do you think? It works. Narrowed the problem down to server settings, and not code. So I guess I have to start comparing the output of phpinfo() now.....
UPDATE2:
no changes seen in the php_info() page... weird... :roll:
Last edited by mbootsman on Thu Mar 26, 2009 7:54 pm, edited 1 time in total.
mbootsman
 
Posts: 89
Joined: Tue Apr 29, 2008 7:09 am

Re: Setting up a 'Contact' form in PivotX..

Postby mbootsman » Thu Mar 26, 2009 9:20 am

I found another weird thing. In the Pagelist in the admin part, I see the following:
*image removed*

In the summary I can see the form data!! Changing the language in the config, also changes this, so it seems to work fine, except when I want to view the page..How is this possible?
Last edited by mbootsman on Thu Aug 18, 2011 8:07 am, edited 1 time in total.
mbootsman
 
Posts: 89
Joined: Tue Apr 29, 2008 7:09 am

Re: Setting up a 'Contact' form in PivotX..

Postby mbootsman » Thu Mar 26, 2009 12:08 pm

Guys, looking at this, I have a last question. How is it possible I can see the right content in de Pages Overview, but not on the page itself?
mbootsman
 
Posts: 89
Joined: Tue Apr 29, 2008 7:09 am

Re: Setting up a 'Contact' form in PivotX..

Postby mbootsman » Thu Mar 26, 2009 7:47 pm

Maybe I can answer this for a bit myself. The pages overview does not use the module_parser output() function, but what does it use? This can really help to pin down the problem.
mbootsman
 
Posts: 89
Joined: Tue Apr 29, 2008 7:09 am

Re: Setting up a 'Contact' form in PivotX..

Postby THijs » Fri Mar 27, 2009 8:37 am

Hy Pieter,

I used the line from above :
Code: Select all
[[ php ]]chdir("../gbcf-v3/");include_once("form.php");[[ /php ]]

The form shows up fine, it just doesn't send anything. While when I use it outside of pivotx (which i started doing, but makes me strip most of the regular content), it works like a charm.

Would that work with the current templating language or should it be rewritten. The fact that is shows normally makes me wonder if that is the problem.

Greetz,
THijs
THijs
 
Posts: 5
Joined: Fri Mar 20, 2009 5:48 pm

Re: Setting up a 'Contact' form in PivotX..

Postby mbootsman » Fri Mar 27, 2009 11:29 am

Would it be handy for anyone who likes to help, to compare phpinfo() output of both servers?
Please drop me an PM for the addresses.

Thanks in advance for helping me. BTW Mike has given up on helping...
mbootsman
 
Posts: 89
Joined: Tue Apr 29, 2008 7:09 am

Re: Setting up a 'Contact' form in PivotX..

Postby sc123 » Thu Jun 04, 2009 11:40 pm

hansfn wrote:Just set "allow_php_in_templates" to 1 in the advanced configuration to use PHP in the templates.


Perhaps this should be added to the OP and changed to say that is must be "added" - not "set", since the key is not included by default.
sc123
 
Posts: 14
Joined: Wed Jun 03, 2009 11:07 pm

Re: Setting up a 'Contact' form in PivotX..

Postby gwbonline » Tue Jun 30, 2009 3:12 pm

How to remove the spam question and the pull down menu's? I set everything to no in the config file and still these items ar visible. I want a simple email form with only name, email and message.
gwbonline
 
Posts: 580
Joined: Tue Jan 01, 2008 5:17 pm

PreviousNext

Return to 2.x Discussion

Who is online

Users browsing this forum: No registered users and 3 guests

cron