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.

GF conditional logic not working as expected

  1. Ketiga
    Member

    Hi,

    I am using jquery ui to show my radiobuttons, checkboxes etc. as buttons.

    My initial problem:

    Clicking a button and moving (dragging) your mouse (unintentionally) before the mouseup.
    This results in the click being ignored.

    Solution (for now):
    http://ultcombo.github.com/UltButtons/

    This works great. Now you can click, move/drag a little with your mouse, release and the click still gets registered.

    New problem:

    Now the GF conditional logic doesn't fire. It only fires if you click, really hold your mouse still and release.

    This is a big issue for a lot of users. The unintended moving of your mouse can always happen, due to mouse sensitivity or even if you click fast through a form and move your mouse when clicking without knowing it. But I really need the logic working with it as well.

    Is this a known problem and more important: can it be fixed? :)

    Thanks in advance!

    Posted 5 years ago on Wednesday February 20, 2013 | Permalink
  2. Richard Vav
    Administrator

    Do you have a link to a page with your form on it so we can take a look, you may need to add a bit more jquery like this to fire the conditional logic, with 2 being the form number and 40-42 being the fields with conditional logic applied to them

    $('#r-end-config').click(function(){gf_apply_rules(2,[40,41,42]);});
    Posted 5 years ago on Wednesday February 20, 2013 | Permalink
  3. Ketiga
    Member

    Hi, Thanks for your reply.

    Unfortunately, that didn't work. I also already see similar code when I check the source codes of my pages.

    I think the issue is specifically caused by the plugin I use mentioned above to ignore the movement after clicking a button and before letting go. If I hold still the logic works as expected.

    The plugin solves the movement problem, but also causes the logic to not work.

    Can I e-mail you the link? The website isn't public yet.

    Posted 5 years ago on Wednesday February 20, 2013 | Permalink
  4. Ketiga
    Member

    I don't think it's Gravity Forms related. If I want to show an alert it doesn't work either. It only works if I don't move the mouse between mousedown and mouseup....

    Posted 5 years ago on Wednesday February 20, 2013 | Permalink
  5. Ketiga
    Member

    Hi, I think I got it working.

    My alert did show when I used a change instead of a click event.

    So I changed my function to:

    $j("#choice_84_1").change(function(){
    gf_apply_rules(2,[124,310]);
    });

    Thanks so much!

    Posted 5 years ago on Wednesday February 20, 2013 | Permalink
  6. Richard Vav
    Administrator

    No problem, I used that example for a button element in a html field so I forgot to modify it for your radio/checkbox type input fields.

    Posted 5 years ago on Wednesday February 20, 2013 | Permalink
  7. Ketiga
    Member

    Is there a way to reapply the form conditions for the entire form?

    So something like this:

    gf_apply_rules(2,[124,310]);

    But without having to name all of the field id's?

    Posted 5 years ago on Wednesday February 20, 2013 | Permalink
  8. Richard Vav
    Administrator

    Not that I am aware of, not saying it wouldn't be possible but I didn't spend a lot of time looking into it when I was working on the form that used that sample.

    Posted 5 years ago on Wednesday February 20, 2013 | Permalink
  9. Ketiga
    Member

    OK, and how about letting the GF conditional logic react on change events instead of click events?

    Just thinking of ways to fix this :)

    Is there a way to change that?
    I know the logic works with click events. But, i need to use change events because I need the button improvement as explained above.

    Then I wouldn't have to reapply the rules for every field.

    Posted 5 years ago on Wednesday February 20, 2013 | Permalink