Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2016-04-28 13:36:11

Registered: 2005-08-24
Posts: 103

Accessing POST values after the preview


I need to use css class on comments forms inputs, so I use pure html instead of <txp:comment_name_input />.
But how can I insert posted form values after the preview to the inputs? How can I access the POST?

Thank you


#2 2016-04-28 16:28:20

From: Cologne
Registered: 2006-08-15
Posts: 4,304

Re: Accessing POST values after the preview

Ji31 wrote #298868:

I need to use css class on comments forms inputs

I’d try it with the comment_name_input tag and a preg_replace, instead. Please note: Absolutely untested and quickly cobbled together from several snippets:

<txp:php>echo preg_replace('/class="comment_name_input"/','class="YOURCLASSNAME comment_name_input"', parse('<txp:comment_name_input />'));</txp:php>

Might need escaping and several fixes more, but I hope you get the idea.

Edit: Could now try it and yup, needed escaping (amended the above code.)

Last edited by uli (2016-04-28 21:38:42)

In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links


Board footer

Powered by FluxBB