GetSimple Support Forum

Full Version: contact form in sidebar
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

Just installed, and first post, great stuff guys. I'm using the default theme an installed the p01-contact plugin. Question is can the contact from be put in the sidebar?

Thanks,
Ed
Ed, welcome

do you ask because your integration did not work?

or do you ask before you tried to integrate the form?

A test took me 2 minutes to find out, that including
Code:
(% contact %)
into the sidebar in the template does not work


it took me one minute to read the information in the EXTEND and to go to the homepage of the plugin:
http://nliautaud.fr/wiki/travaux/p01-con...s_examples

there I found the following information
Quote:For example, to display a default contact form in your sidebar :

<?php
get_component('sidebar');
echo $p01contact->parse('(% contact %)');
?>

So did you try this way?
Hi Connie,

Thank you for the reply. Yes, I got the in page contact form working. For the sidebar I did go to the developers page and missed the sidebar code scrolling through. I should have ctl-f for "sidebar". My apologies. I did search the forum though before posting.

Thanks again,
Ed



Connie Wrote:Ed, welcome

do you ask because your integration did not work?

or do you ask before you tried to integrate the form?

A test took me 2 minutes to find out, that including
Code:
(% contact %)
into the sidebar in the template does not work


it took me one minute to read the information in the EXTEND and to go to the homepage of the plugin:
http://nliautaud.fr/wiki/travaux/p01-con...s_examples

there I found the following information
Quote:For example, to display a default contact form in your sidebar :

<?php
get_component('sidebar');
echo $p01contact->parse('(% contact %)');
?>

So did you try this way?
so tell us when it is working for you, ok?
it's blank in the sidebar. I must be missing something. I put the code in Theme>Edit Components. Both by adding a Component and pasting into the existing "sidebar" component.

Code:
<?php
get_component('sidebar');
echo $p01contact->parse('(% contact %)');
?>
ewoood Wrote:it's blank in the sidebar. I must be missing something. I put the code in Theme>Edit Components. Both by adding a Component and pasting into the existing "sidebar" component.

Code:
<?php
get_component('sidebar');
echo $p01contact->parse('(% contact %)');
?>


yes, you mixed something. A component should not be pasted into another component, but into a template.
When you use the theme "innovation" which is the default template, you go to

Theme / Edit Theme / choose "sidebar.php" in the right selectbox, and add the code into that template where you want to have it
Hi Connie,

Woohoo! Works great!

Thank you,
Ed
ewoood Wrote:Hi Connie,

Woohoo! Works great!

Thank you,
Ed

so, as I am "following the masses" and activated the reputation-feature in my profile, I am open to get a positive reputation from you ;=)