Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-09-19 23:59:13

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

passing article title to a form input value?

basically i’m trying to do the following for a typical paypal form:

<input type="hidden" name="item_name" value="<txp:title />">

as an example, we’ll say the article title is “this is the page title”. but it gets encoded into html entities and is passed as this:

<input type="hidden" name="item_name" value="this&#160is&#160the&#160page&#160title">

i need to somehow ‘decode’ the passed title to get rid of the “&#160”‘s showing up so it looks like this:

<input type="hidden" name="item_name" value="this is the page title">

—-

is there a different way i should be doing this in order to get the output i want?

Last edited by iblastoff (2007-09-20 00:05:38)

Offline

#2 2007-09-20 00:57:14

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: passing article title to a form input value?

i’m gonna use this instead :

<input type="hidden" name="item_name" value="<txp:article_url_title />">

which uses the url title so it becomes:
<input type="hidden" name="item_name" value="this-is-the-page-title">

thanks anyway!

Last edited by iblastoff (2007-09-20 00:57:32)

Offline

Board footer

Powered by FluxBB