Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
How can I set values for comment inputs?
I’m working on a site that uses ign_password_protect to distinguish between users who are logged in and those who are not. For logged in users, I want to pre-populate the comment form data so they needn’t enter their name and eMail address again. If I could add a value
attribute to the comment input fields, I could place the ign_user_info tags there, but the comment inputs don’t take any attributes.
Thanks!
Offline
Re: How can I set values for comment inputs?
johnstephens wrote:
I want to pre-populate the comment form data so they needn’t enter their name and eMail address again
Funny, I had exactly the same requirement recently. Never solved it and gave up trying. Thinking about it again, could you use a couple of lines of jQuery to read the ign_cookie and throw the useful bits it in the relevant input boxes? Not sure if that’d work but it might.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Online
Re: How can I set values for comment inputs?
I’m not completely there yet, but rah_comment_form goes ninety percent of the distance ! All i need is to get it to use the ign_user
’s realname instead of the user id, and to allow optional input for a URL.
Offline
Re: How can I set values for comment inputs?
I just realized this problem may have a very simple solution that blindly overlooked: Use input
elements rather than txp:comment
input tags! I’ve done this before for search, and I can’t think of any reason it won’t work in my comment form. I’ll try it out tomorrow. Thanks again!
Offline