• Resolved donnakat1

    (@donnakat1)


    I have been trying to implement the word count javascript but it will not work for me. I did it exactly as posted.
    First of all please add an additional attribute to the field, with the below info:

    Name – onchange
    Value – myfunction(this)

    Then please enter for options > Javascript and add the below code there:
    // before form submit
    function myfunction(elem)
    {

    var my_value = jQuery(elem).val();
    if(my_value.split(” “).length > 2 ){
    alert(‘message’);
    jQuery(‘.button-submit ‘) .attr(‘disabled’, ‘disabled’);
    jQuery(elem) .effect( “shake”, {}, 500 ).css(“background-color”,”#FF8F8B”).animate({backgroundColor: transparent}, {duration: 500, queue: false });

    } else{
    jQuery(elem).css(“background-color”,”transparent”);
    jQuery(‘.button-submit ‘) .removeAttr(‘disabled’);
    }

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Hi,

    Could you please try to increase the max length in the attributes? Please see here.

    This should help.

    Thanks. Have a wonderful day.

Viewing 1 replies (of 1 total)

The topic ‘Word Count’ is closed to new replies.