Page 1 of 1
Contact form which uses Extra Page Attributes ?
Posted: Fri May 29, 2009 1:33 pm
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
Re: Contact form which uses Extra Page Attributes ?
Posted: Sun May 31, 2009 10:13 am
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}
Re: Contact form which uses Extra Page Attributes ?
Posted: Thu Jun 04, 2009 1:09 pm
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
Re: Contact form which uses Extra Page Attributes ?
Posted: Thu Jun 04, 2009 7:14 pm
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.
Re: Contact form which uses Extra Page Attributes ?
Posted: Fri Jun 05, 2009 3:30 pm
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 ?
Re: Contact form which uses Extra Page Attributes ?
Posted: Fri Jun 05, 2009 8:26 pm
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.