Textpattern CMS support forum
- 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?
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,279
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)