Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-07-31 07:46:28

osmanjaro
Member
Registered: 2005-09-02
Posts: 10

Passing article titles to a contact form

Hi, I’d love to know how to do this thing. please can someone help?

I would like to have a link at the bottom of an article that sends the title of the article to the contact form.
So the form is all ready on the contact page (or sidebar) with articles that the user has requested more info on.

Example:
A user wants to learn more about apples and bananas.
He clicks the ‘learn more’ link at the bottom of each article and when he checks the contact page..
The apples and bananas checkboxes are already checked and ready to be sent with zem_contact.

I have played with yab_shop and it seems to be a sledgehammer answer for this little pistachio of a task.

Thanks

i

Offline

#2 2010-07-31 10:36:54

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Passing article titles to a contact form

You can do all sorts of contact form systems with zem_contact_reborn. It also has the option to mail the article, or you can pretty freely pass data from article to the form with the attributes.

Quick example of the send_article feature:

<txp:zem_contact to="you@example.com" send_article="1">
	<txp:zem_contact_email label="Your Email" />
	<txp:zem_contact_submit label="Send Article" />
</txp:zem_contact>
<txp:zem_contact_send_article />

And/or, if the form is within individual article contect, you can use nested tags (tags-in-tags). In this we use <txp:title /> as the subject="":

<txp:zem_contact to="you@example.com" subject='<txp:site_name />: <txp:title />'>
	<txp:zem_contact_email label="Your Email" />
	<txp:zem_contact_submit label="Send" />
</txp:zem_contact>

More:

Offline

Board footer

Powered by FluxBB