Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2013-07-17 07:53:10

anagomes
New Member
Registered: 2013-07-16
Posts: 9

Comment info is not kept when hit preview button

Hello all!
I’m trying to customise my comment form but apparently I lost some features in between… I don’t want to have a label for each input box but a placeholder text. I couldn’t find any other way to do this except by creating new input boxes with the same attributes as the default option. The submiting of the comment is working but the previous step is not… When I hit preview, the next screen shows me my comment but doesn’t keep the info in the input boxes (name, email, message). So, I have to fill everything again and only then hit submit.
How can I fix this? Here’s my website link: http://smalltalk.subbureau.com/
Thanks in advance

Last edited by anagomes (2013-07-17 07:54:05)

Offline

#2 2013-07-17 08:25:11

etc
Developer
Registered: 2010-11-11
Posts: 5,394
Website GitHub

Re: Comment info is not kept when hit preview button

New input boxes won’t retain the functionality of txp tags. You can modify the attributes of any node with etc_query:

<txp:etc_query data='<txp:comment_name_input />'
	query="input[@id='name']"
	replace="@@required=required@placeholder=Required" />

Offline

#3 2013-07-17 08:41:52

anagomes
New Member
Registered: 2013-07-16
Posts: 9

Re: Comment info is not kept when hit preview button

I’m sorry, maybe I’m not reading the documentation correctly… I get this error:
Textpattern Warning: tag does not exist while parsing form “default” on page “smalltalk”

Last edited by anagomes (2013-07-17 08:42:05)

Offline

#4 2013-07-17 08:47:31

etc
Developer
Registered: 2010-11-11
Posts: 5,394
Website GitHub

Re: Comment info is not kept when hit preview button

You should install and enable the plugin first. :) Then replace <txp:comment_name_input /> in your comment_form by the snippet above.

Offline

#5 2013-07-17 08:57:32

anagomes
New Member
Registered: 2013-07-16
Posts: 9

Re: Comment info is not kept when hit preview button

Nevermind! I found the problem!
Thank you so much for the help!

Offline

Board footer

Powered by FluxBB