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.

JS bug in admin for select fields...

  1. After the last update I noticed this problem popping up while trying to edit a select/dropdown from my WordPress admin.

    The problem:
    In the WordPress admin, while editing a form, clicking on the "Edit" link for a select field which contains numeric option values was throwing this error:

    Object 43 has no method "replace"

    As a result, the edit options do not appear and the element cannot be edited.

    Expected behavior:
    Clicking on "edit" for the dropdown should have opened the dropdown's customization options. Clicking "edit" should not have generated any JS errors.

    Detail:
    The dropdown contained a list of options with numeric values and separate text. The first option contained a value with the integer "43", and the JS was assuming ( by virtue of calling value.replace() ) that the "value" variable would be a string. This causes an error because the .replace() method only exists for strings, not for integers.

    Solution:
    The problem file is js.php in the GetFieldChoices() function. I was able to solve the error for now by adding value = value.toString(); at around line 869, after the value variable is defined.

    Posted 11 years ago on Monday March 25, 2013 | Permalink
  2. If you are using WordPress 3.5.1 and Gravity Forms 1.6.12, please begin troubleshooting by checking for theme and plugin conflicts using these tips http://rkt.gs/testing

    If you don't find anything there, I will bring this to the attention of the development team.

    Posted 11 years ago on Monday March 25, 2013 | Permalink