WordPress.org

Ready to get started?Download WordPress

Forums

Gravity Forms Auto Placeholders
Bug breaks the placeholder (3 posts)

  1. cmccrone
    Member
    Posted 1 year ago #

    If you have a multiple page form and you go back a page within the form (maybe to changed something on page 1) the titles come back and page holders are gone until you refresh the page (but then you lose everything you wrote/selected).

    This also happens when there is an error. Lets say someone missed a field and pushes next or send. The form shows the red error message but again, the titles come back and placeholders are gone.

    Still love the plugin, maybe a fix soon?

    http://wordpress.org/extend/plugins/gravity-forms-auto-placeholders/

  2. pingram3541
    Member
    Posted 1 year ago #

    This also affects when the form is submitted with validation errors when using ajax, since the function is only called when the document is loaded rather than every time the form is submitted, included multi-step forms.

    The fix is to wrap the script found in 'gravity-forms-auto-placeholders.php' with 'gform_post_render'

    Just after:
    jQuery(document).ready(function($){
    add:
    $(document).bind('gform_post_render', function(){

    then just before:
    // Ends allowance of jQuery to $ shortcut
    });
    add another:
    });

    ps - also to plugin author, change <script> tag to <script type="text/javascript"> so that it doesn't break w3c validation on pages with forms.

  3. Sith Lord Goz
    Member
    Posted 1 year ago #

    @pingram3541

    Nice fix! Also note to plugin author: the second .each() loop in the Modernizr block also needs the gforms wrapper targetting, or it will target ALL input/textareas!

    ----
    if(!Modernizr.input.placeholder){$(".<?php echo $gfap_class; ?> input, .<?php echo $gfap_class; ?> textarea").each

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.