maxlenght conditional check - Printable Version +- MyBB Community Forums (https://community.mybb.com) +-- Forum: Community Archive (https://community.mybb.com/forum-106.html) +--- Forum: Archived Forums (https://community.mybb.com/forum-143.html) +---- Forum: Archived Development and Support (https://community.mybb.com/forum-155.html) +----- Forum: MyBB 1.6 (https://community.mybb.com/forum-138.html) +------ Forum: 1.6 General Support (https://community.mybb.com/forum-127.html) +------ Thread: maxlenght conditional check (/thread-146174.html) |
maxlenght conditional check - marcus123 - 2013-10-02 Please help, How to check if the maxlenght has the correct value before submitting? I set maxlenght="50" but people will use Firebug to modify that so I want to some how maybe with conditional template check if the input value is not more that 50? RE: maxlenght conditional check - Destroy666 - 2013-10-02 Well, you would have to check it serverside (with PHP, strlen on $mybb->input['xxx'] or whatever) and throw error if it's too long, maxlength isn't even supported in IE < 8.. Can't do it with Template Conditionals, need plugin/core modification. Neither can it be done with XThreads @down. RE: maxlenght conditional check - marcus123 - 2013-10-02 This is the line I want to restrict to max 50 characters
Can I do it with xthreads? Can I use something like this for conditional?
RE: maxlenght conditional check - Destroy666 - 2013-10-02 The easiest way would be to edit inc/datahandlers/post.php Change 85 to your value.
RE: maxlenght conditional check - marcus123 - 2013-10-02 Destroy do you know if I can do it with JavaScript form validate? Any good JavaScript code that will work with all the browsers? |