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.

Javascript on Form settings in 1.7.2

  1. Hi,

    I see that the gform_load_form_settings jQuery hook is deprecated and the gform_editor_js is not run on the Form Settings page anymore in v1.7.2. I have previously added some fields to the form settings like a featured image, form category, etc... Things only the admin should be able to modify. With the changes in v1.7.2 the form does not populate with the existing values (and maybe more problems, but haven't got there yet). What is the recommended way to populate the fields with previously saved values on the Form Settings page?

    Thanks

    Posted 10 years ago on Tuesday April 30, 2013 | Permalink
  2. no help here?

    Posted 10 years ago on Tuesday May 7, 2013 | Permalink
  3. Take a look at the Developer Notes for v1.7x here http://www.gravityhelp.com/gravity-forms-v1-7-developer-notes/ . This gives some alternative hooks to use for the deprecated ones.

    Posted 10 years ago on Tuesday May 7, 2013 | Permalink
  4. awesome, thanks!

    Posted 10 years ago on Wednesday May 8, 2013 | Permalink
  5. Is there a suggested hook to use instead of gform_editor_js? In the link you provided and the docs, it just says gform_editor_js will not be fired on the Form Settings page. I can't find any suggestions to use an alternative method for running js on the Form Settings page.

    Posted 10 years ago on Wednesday May 8, 2013 | Permalink
  6. @webheadllc: I replaced gform_editor_js with admin_print_scripts-toplevel_page_gf_edit_forms action and just made sure that the JS accounted for whether the settings page objects were actually present on the page.

    NB: if you're enqueuing scripts, don't forget to add them to the list of required scripts through the gform_noconflict_scripts filter!

    Posted 10 years ago on Monday May 20, 2013 | Permalink