Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Preview only if have required fields?
Hey ya’lls,
Is there a way to only preview a comment if all required fields have been provided? I’d rather not show the comment at all if all the fields aren’t there for me to format. It looks funky. (But I’ll still show an error message.) I’m not sure how to do this with any existing plugins, such as chh_if_data.
Thanks!
~joe
Offline
#2 2006-03-25 05:56:11
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Preview only if have required fields?
Make use of the if_comments_error tag (it apparently hasn’t been documented at TextBook yet).
Last edited by Mary (2006-03-25 05:56:21)
Offline
Re: Preview only if have required fields?
Thanks Mary, you’ve got to be up for the Most Helpful Forum Member Award. But the tag doesn’t seem to be working. The test always reports no errors.
Looking at the source, I’m guessing that if it were to work it would consider a captcha plugin error to be a comment error, but I’d want to show the comment in that case; I’m not sure I could use it.
For now I’m using txp:chh_if_data to select between a non-blank string and the string “[blank]”. That seems to keep preview comment looking reasonable, anyway.
Offline
#4 2006-03-27 01:28:58
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Preview only if have required fields?
Have you required user name and email in the admin prefs?
Offline
Pages: 1