This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Using user account names for comment Name?
#1

Hello, first of all, great job with Commentics. It was just the solution I was looking for. I do have one problem though:

I have certain users on my site that should be able to comment but not change their name (it should load from session)

I changed the code in form.php to replace the value of the Name input and disable it for those users, however, when I try to post as one of those users, I get a banned message. In checking the ban logs, it says banned due to mismatching data. Any ideas?

Thanks,
Joe
Reply
#2

Hi,

When you disable a form field using something like disabled="disabled", the value of that form field does not get submitted as part of the form data. That's the case in general and not just for Commentics. So the script is expecting a name to be submitted but there is no name so the data is mismatching. Try adding an attribute like readonly="readonly" instead. They basically do the same thing.

Have you completed the interview?
Reply
#3

(14-Apr-2012, 02:44 PM)Steven Wrote:  Hi,

When you disable a form field using something like disabled="disabled", the value of that form field does not get submitted as part of the form data. That's the case in general and not just for Commentics. So the script is expecting a name to be submitted but there is no name so the data is mismatching. Try adding an attribute like readonly="readonly" instead. They basically do the same thing.

Thanks, Steven. I made a workaround by having putting in a hidden input but your solution is cleaner.
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by mtnlvy
06-Jan-2019, 06:29 PM
Last Post by allseo
19-May-2018, 08:03 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)