Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-03-23 15:13:08

spiffin
Plugin Author
From: London, UK
Registered: 2004-06-08
Posts: 95
Website

Can I use jQuery to append a form to an article?

Hello

Just a quickie.

Is it possible to use Textpattern tags inside a jQuery function?

Something like this:

$('article').append("<txp:output_form form="myform" />");

Thanks

Offline

#2 2012-03-23 15:32:07

Gocom
Plugin Author
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,530
Website

Re: Can I use jQuery to append a form to an article?

Textpattern tags are server-side code (and are to be parsed on the server), JavaScript is client-side. Yes, you can use Textpattern tags in any content, in any context — tags and the tag parser don’t care. What you might recognize as JavaScript, is just like any other line of text for Textpattern, its parser and the server.

Offline

#3 2012-03-25 00:36:27

spiffin
Plugin Author
From: London, UK
Registered: 2004-06-08
Posts: 95
Website

Re: Can I use jQuery to append a form to an article?

Thanks Jukka.

I managed to do what I was trying to do by using jQuery’s load function and loading the html content of a form from a text file.

Offline

Board footer

Powered by FluxBB