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.

tabindex fix causing Ajax error

  1. Hi

    I was looking for a fix to a tabindex problem for forms with a comment box on the page.

    I found this support forum post http://www.gravityhelp.com/forums/topic/field-tab-order#post-9548 and applied this line of code to my custom_functions.php file

    add_filter('gform_tabindex', create_function('', 'return 4'));

    This worked on setting the tabindex. But now I get an Ajax error whenever I save or select a form. eg.

    Save form: "Ajax error when saving form"
    Import/Export>Select Form: "Ajax error when selecting form"

    If I comment out the gform_tabindex code these errors don't appear.

    Have tried this with Firefox, IE, Chrome and with all other plugins disabled.

    Here are my details:
    http://production-scheduling.com
    http://production-scheduling.com/demand-planning-allocation-of-inventory-to-customer-orders/
    Wordpress 3.2, Gravity Forms 1.5.3, Thesis 1.82

    Many thanks in advance for the help

    Kien Leong

    Posted 7 years ago on Tuesday November 1, 2011 | Permalink
  2. Kein, on your filter, try altering it for a specific form(s), for example, this would be for form ID #1:

    add_filter('gform_tabindex_1', create_function('', 'return 4'));

    See if that works for you.

    Posted 7 years ago on Tuesday November 1, 2011 | Permalink
  3. Thanks Rob

    Unfortunately no. This doesn't make any difference.

    Any other suggestions?

    Posted 7 years ago on Wednesday November 2, 2011 | Permalink
  4. Can you post your custom_functions.php code to pastie.org or pastebin.com please? The gform_tabindex code runs when the form is displayed on the front end, so I don't think it is related at all to your error when you go to save a form in the admin.

    Can you try a different browser and see if the issue goes away? Or, test for a theme or plugin conflict.

    http://www.gravityhelp.com/documentation/page/Testing_for_a_Theme/Plugin_Conflict

    That tabindex code should have no effect on your ability to save a form. Maybe there was another change around the same time, even a change made by the host that you might not have been warned about (mod_security or some other configuration was changed or upgraded.)

    Posted 7 years ago on Wednesday November 2, 2011 | Permalink