Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
p01-contact : simply add contact forms in your pages
Hi. I'm very new to GetSimple and still a pretty amateur PHP coder, so I thought I'd post a frustrating problem I had with p01-contact, and the way I finally solved the problem.

The problem: I could not get even the default contact form to show up in the sidebar, using the included innovation theme.

I could get the form to show up in the body of a page by just entering

(% contact %)

However, that didn't work when I pasted it into the Theme > Edit Components > Sidebar field in the admin pages. I read the author's documentation closely, and knew I had to put the following code somewhere -- but where?

PHP Code:
$p01contact->parse('(% contact %)');

I tried pasting that into the sidebar component field, under the heading "contact us", but just got the heading repeated many times down the sidebar, with no form. When I left off the get_component line, I was down to just one instance of the header in the sidebar -- but still no form.

Finally I figured it out: The PHP code above goes into the file in the theme's folder. As it turns out, the get_component line is already there, so I just had to add the echo line. This is what it looks like, at the end of the file:

PHP Code:
    <!-- wrap each sidebar section like this -->
div class="section">
php get_component('sidebar');    
$p01contact->parse('(% contact %)');

And now I have the default form, and can start figuring out how to customize it.

I just want to emphasize that my frustration was mostly the result of my own ignorance when it comes to GetSimple, plus slightly confusing documentation. Maybe it would be possible to be even more explicit in the documentation where the code should go?



Messages In This Thread
RE: p01-contact : simply add contact forms in your pages - by tf2 - 2012-11-30, 04:18:55
askcopy syntax Not Working - by celextel - 2019-05-24, 01:54:40
RE: askcopy syntax Not Working - by celextel - 2019-05-28, 01:51:47

Users browsing this thread: 1 Guest(s)