The forum of the forums

Would you like to react to this message? Create an account in a few clicks or log in to continue.
The forum of the forums
2 posters

    minimum character post

    Sukii
    Sukii
    New Member


    Posts : 16
    Reputation : 1
    Language : English
    Location : Earth

    Solved minimum character post

    Post by Sukii March 9th 2013, 4:35 am

    Hi, how do I add a minimum character when someone posts? Is it possible?

    Sir Chivas™
    Sir Chivas™
    Helper
    Helper


    Male Posts : 6980
    Reputation : 457
    Language : EN, FR, ES
    Location : || CSS || HTML || Graphics Designs || Support ||

    Solved Re: minimum character post

    Post by Sir Chivas™ March 9th 2013, 4:52 am

    Hi,

    Create a new JavaScript: ACP >> Modules >> JS codes management >> Add create a new js >> Title: Whatever you want >> Placement : In topics only >> Insert this code:

    Code:
    $(function() {
    var x=document.forms['post'];
    $(x.post).click(function(e) {
     if (x.message.value.length < 10) {
      e.preventDefault();
      alert('Your post must contain at least 10 character');
     }
    });
    });

    Save it.

    Test it out, create a test thread insert only 3 characters and try posting it. Wink
    Sukii
    Sukii
    New Member


    Posts : 16
    Reputation : 1
    Language : English
    Location : Earth

    Solved Re: minimum character post

    Post by Sukii March 9th 2013, 5:01 am

    Thank you very much!

    minimum character post Untitl10

    EDIT: Solved


    Last edited by ~TheBird on March 9th 2013, 5:02 am; edited 1 time in total
    Sir Chivas™
    Sir Chivas™
    Helper
    Helper


    Male Posts : 6980
    Reputation : 457
    Language : EN, FR, ES
    Location : || CSS || HTML || Graphics Designs || Support ||

    Solved Re: minimum character post

    Post by Sir Chivas™ March 9th 2013, 5:01 am

    No problem, Wink
    Is this solved?
    He edited the post above.

    Topic Solved & Locked

      Current date/time is November 11th 2024, 8:32 pm