Contact form which uses Extra Page Attributes ?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
paulie
Forum Members
Forum Members
Posts: 13
Joined: Fri May 29, 2009 12:52 pm

Contact form which uses Extra Page Attributes ?

Post by paulie »

Hi,

I am doing a site for various different clubs around Europe (45 clubs), but I want the clubs to maintain their own details like
- Chairmans Name
- Meeting Times
- Address

I've done these via the content blocks i.e.
{content block="Meeting Times Monday"  oneline="true"  wysiwyg="false"}

But I am wondering how can I add a contact form, either by using FormBuilder module or some other module to create a contact form based on something entered as  a content block or as an Extra Page Attribute. Is it possible ?

Thanks,
Paulie
User avatar
plger
Forum Members
Forum Members
Posts: 196
Joined: Wed Oct 15, 2008 10:38 am

Re: Contact form which uses Extra Page Attributes ?

Post by plger »

You can store the club key-name in extra1 and retrieve it with:

Code: Select all

{capture assign='clubkeyname'}{page_attr key="extra1"}{/capture}
or with CGSimpleSmarty, then you can use the attribute either to select a FormBuilder form (each club having its own) or to give a field value is the forms are very much alike:

Code: Select all

{cms_module module='FormBuilder' form=$clubkeyname}
{cms_module module='FormBuilder' form='theform' value_clubname=$clubkeyname}
User avatar
paulie
Forum Members
Forum Members
Posts: 13
Joined: Fri May 29, 2009 12:52 pm

Re: Contact form which uses Extra Page Attributes ?

Post by paulie »

Thanks for your help plger, sorry about the delay in replying, but some doctor thought I had swine flu (not kidding).

I am still having problems with this, as I don't want to have the email address available in a hidden field.


In the Form Fields I selected to add [glow=red,2,300]Email to User-Supplied Email Address[/glow] Field, but it said that I could only use Smarty tags in the message , and not in the To Fields
User avatar
plger
Forum Members
Forum Members
Posts: 196
Joined: Wed Oct 15, 2008 10:38 am

Re: Contact form which uses Extra Page Attributes ?

Post by plger »

I would say: use a "*Email Results Based on Pulldown" field, supply it's value in the formbuilder tag and hide it with css. Emails aren't shown, and you get the desired result.
User avatar
paulie
Forum Members
Forum Members
Posts: 13
Joined: Fri May 29, 2009 12:52 pm

Re: Contact form which uses Extra Page Attributes ?

Post by paulie »

Thanks for the idea plger, but I don't think that will work, as robots will be able to find out all the email addresses of every club chairman across europe.

I think I will just create 35 contact forms.

Is there an easy way in the templates to say, if page = austria , select this contact form ?
User avatar
plger
Forum Members
Forum Members
Posts: 196
Joined: Wed Oct 15, 2008 10:38 am

Re: Contact form which uses Extra Page Attributes ?

Post by plger »

paulie wrote: I don't think that will work, as robots will be able to find out all the email addresses of every club chairman across europe.
I'm not sure why you think so. Hiding with css was just meant not to display the dropdowns, the email addresses aren't in the dropdown anyway, they're just in the db, but associated with the option values. But as you wish.
paulie wrote: Is there an easy way in the templates to say, if page = austria , select this contact form ?
See my first reply. You can either use the extra1 attribute, or use $page_alias as the form parameter of FormBuilder.
Post Reply

Return to “Modules/Add-Ons”