Using Gravity Forms ‘gform_user_registration_form_selected’ JavaScript event

The gform_user_registration_form_selected Gravity Forms JavaScript event is fired on the feed configuration page after a form has been selected from the “Select Form” dropdown. This event is useful for updating or setting options that are dependent on properties of the selected form. However, this hook was removed in version 3.0 with no replacement.

Usage

<script type="text/javascript">
    jQuery(document).on('gform_user_registration_form_selected', function(event, form) {
        // your custom code here
        return event;
    });
</script>

Parameters

  • event (Event Object): The JavaScript event object.
  • form (Form Object): The form meta of the selected form.

More information

See Gravity Forms Docs: gform_user_registration_form_selected

Note: As the gform_user_registration_form_selected event has been removed in version 3.0, the provided example may not work with newer versions of Gravity Forms.

Examples

Run a function after the form has been selected

This example runs the CreateBuddyPressMetaOptions function after a form has been selected.

<script type="text/javascript">
    jQuery(document).on('gform_user_registration_form_selected', function(event, form) {
        CreateBuddyPressMetaOptions();
    });
</script>