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.

Is there a way to hook into gf_apply_rules ?

  1. Hello,
    I have a basic form with several simple options all hidden by conditional logic. I also have two options which need to load other forms. I want it to look seamless to the user and just show the list as radio buttons.

    In the source code I see 'gf_apply_rules' referring to the conditional logic, but there is no information in the docs. Is it possible to manipulate that and have another form display onClick?

    Posted 13 years ago on Monday December 12, 2011 | Permalink
  2. Hi Badfun,

    It'd probably be easier to manually bind the click event of radio button rather than trying to integrate with the gf_apply_rules function. Here is some jQuery documentation to get you started:

    http://api.jquery.com/click/

    Posted 13 years ago on Monday December 12, 2011 | Permalink
  3. Hi David, thanks for the response.
    I've been reading up on gform_field_input and gform_field_content to see if I could insert my own two options to the radio button; I hadn't thought of manipulating the jQuery. I'll see what I can figure out.

    Posted 13 years ago on Monday December 12, 2011 | Permalink
  4. Thanks David, that worked like a charm! I should have known I was overthinking it. Here is the code I tested:

    $('#choice_1_3').click(function() {
      $('#gform_wrapper_2').show();
    });

    all the radio buttons are in #gform_wrapper_1 and I just need to create a 'display:none' css rule for #gform_wrapper_2. Looks seamless to the end user.

    Posted 13 years ago on Monday December 12, 2011 | Permalink
  5. Beautiful! Glad we could help and kudos for getting this working. :)

    Posted 13 years ago on Monday December 12, 2011 | Permalink

This topic has been resolved and has been closed to new replies.