Comments module and Form browser

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
sagedel
Forum Members
Forum Members
Posts: 20
Joined: Fri Aug 24, 2007 3:50 pm

Comments module and Form browser

Post by sagedel »

Hi!

I have a system set up where people can view form entries through the form browser on the front end. What I want to be able to do is get it so that people can post comments about each form entry individually.

Right now I have my comments module inserted into the full template like this: {cms_module module='comments' modulename='FormBuilder' pageid=$entry->id}

I thought this might let me post separate comment sets for each entry, but it doesn't work at all.

Any ideas on how I can accomplish this?
sagedel
Forum Members
Forum Members
Posts: 20
Joined: Fri Aug 24, 2007 3:50 pm

Re: Comments module and Form browser

Post by sagedel »

Anyone have any ideas on this?

I have poked around in the forum and I found a solution for the calendar module, but not for the form browser.

I'm pretty sure its just a matter of figuring out what to put in the pageid= field of the module tag. I've tried just about everything I can think of, but I have no idea what I'm doing so that's not saying much.
Sonya

Re: Comments module and Form browser

Post by Sonya »

sagedel wrote: Any ideas on how I can accomplish this?
You can easily figure out what field contains the pageid for Comments Module.
Step 1 - Show all smarty variables on the site

Code: Select all

{get_template_vars}
Step 2 - Find the variable containing the value you need. In this case the variable is the object $resp

Step 3 (optional) If variable is an object or array then print the values

Code: Select all

{$resp|print_r}
Step 4 - Pick the id value or the field containing id and form your Comments tag:

Code: Select all

{cms_module module='comments' modulename='FormBuilder' pageid=$resp->id}
Last line is the solution for your problem.
Peciura

Re: Comments module and Form browser

Post by Peciura »

I include Polls module in the content of some news, which prevented comments from showing up, despite i was alerted about new comment by e-mail. Solution was to change news detail tamplate. At the very top of template i placed

Code: Select all

{capture assign='page_id_temp'}{$entry->id}{/capture}
and the coment tag changed as follows

Code: Select all

{cms_module module='comments' modulename='News' pageid=$page_id_temp emailfield='1'}
Post Reply

Return to “Modules/Add-Ons”