PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Multiple Max Character Count/Limit issue

  1. Noticed there have been a few topics created over the last 6 months. But could not find any that actually had a resolution to this issue.

    Affects (Modal:Fancy Box, Thickbox or Slideshows:Anything Slider)

    The character count jQuery plugin that is being used is being fired multiple times. Not sure why but I don't see any JavaScript conflicts happening. One fix that I was going to implement on our end and suggest as an "improvement" would be to detect if a the .charleft has already been created for the selected textarea/input if it doesn't exist create it else return.

    Within /gravityforms/js/jquery.textareaCounter.plugin.js

    var container = $(this);
    if(container.parent().has('.charleft').length === 0) {
      $("<div class='charleft'>&nbsp;</div>").insertAfter(container);
    }

    or possibly. depending on which way you want to go

    if(container.parent().has('.charleft').length > 0) {
      return;
    }
    
    $("<div class='charleft'>&nbsp;</div>").insertAfter(container);

    Figured I would see if there was a fix at all on the roadmap or I'll just make a note to fix this after an update is applied.

    I believe this may also be related to an issue with ajax forms not submitting properly as well as seen in this post http://www.gravityhelp.com/forums/topic/using-ajax-with-contact-form-in-modal-window-getting-2-spinners

    EDIT: Made a change to my original markup based on some testing.

    Posted 11 years ago on Monday July 30, 2012 | Permalink
  2. Both appear to be working w/ regards to the character count issue as a "hotfix". Seems like a simple update to /gravityforms/js/jquery.textareaCounter.plugin.js.

    This does not fix the issue as to why the plugin itself is binding the selector multiple times when the selector is within a light box or slideshow. Could be something to do with the element being display:none possibly.

    Posted 11 years ago on Monday July 30, 2012 | Permalink
  3. Hi Aaron,

    Could you post a link to somewhere we can see this bug in action?

    Posted 11 years ago on Monday July 30, 2012 | Permalink
  4. Does this site have the ability to direct message some one? I guess I could open up a ticket. Project isn't public yet so I don't want to post to the forum

    Posted 11 years ago on Monday July 30, 2012 | Permalink
  5. Hi Aaron,

    Sorry, forgot to provide you my email: david@rocketgenius.com.

    Posted 11 years ago on Monday July 30, 2012 | Permalink
  6. Thanks David. I sent an email your way. I've already implemented the JS I posted above. But I can disable it if you'd like.

    Posted 11 years ago on Tuesday July 31, 2012 | Permalink