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.

Editing field label breaks dropdown choices for conditional logic

  1. agoranet
    Member

    In Gravity Forms 1.6.3.3.4

    I've seen older posts about this but didn't see anything recent. I have a long form with lots and lots of conditional logic. The client asked for the label on some fields to be changed. When I look at the dropdown options for the other fields whose logic depends on those choices, there are now more options than there should be. Looks like it's not using an ID to reference the other choices so it's adding my new version onto the list.

    Example:
    Field 1: Conference Registration
    * Student Rate
    * Member Rate

    Field 2: Student Options
    * 3-day
    * 4-day

    Conditional Logic:
    * SHOW if ALL are true:
    CONFERENCE REGISTRATION ... is ... Student Rate <-- this dropdown shows "Student Rate" and "Member Rate"

    Now...
    They want to change "Student Rate" to "Student Rate (Full-time only)"

    If I make that change, then go look at my conditional logic dropdown for Field 2, it shows...
    CONFERENCE REGISTRATION ... is ...
    Student Rate
    Member Rate
    Student Rate (Full-time only)

    So I now have 3 choices in the drop down but there are only 2 choices in Field 1. I don't know which to pick to have it work. Seems like I shouldn't have to change anything... I still want it to reference the first choice of Field 1.

    It fixes itself if I pick a different field for "CONFERENCE REGISTRATION" and then change it back again but this is a BIG form with lots and lots of logic so that's not really practical.

    Anything I can do?

    Posted 12 years ago on Tuesday April 3, 2012 | Permalink
  2. Does that information show after you click "Update Form" or before? Meaning, after you update the label, does the logic show the 3 choices right away?

    Posted 12 years ago on Tuesday April 3, 2012 | Permalink
  3. agoranet
    Member

    I just ran a test on it. Here's what I found...

    Field 1 Choices, for example:
    W11 - Workshop 1
    W12 - Workshop 2

    Field 2 Choices - before any changes:
    W11 - Workshop 1
    W12 - Workshop 2

    Go to Field 1, change it to: W111 - Workshop 1

    Field 2 Choices now:
    W11 - Workshop 1
    W12 - Workshop 2
    W111 - Workshop 1

    Update the form

    Field 2 Choices still show the 3 options

    Go back to Field 1 and change back to: W11 - Workshop 1

    Field 2 Choices now correct again...
    W11 - Workshop 1
    W12 - Workshop 2

    Posted 12 years ago on Tuesday April 3, 2012 | Permalink
  4. So it looks like in this example you are editing choices not labels of fields. Updating field labels will automatically update. However, because these are choices they will not and that's because choices can be added and removed at any time. This applies to drop downs, radio buttons, checkboxes.

    If you change drop down, radio button or checkbox choices… you have to update any conditional logic relying on those or they will still be looking for the old choices. This is so you can add and remove things, etc. as needed. Any conditional logic you configured would still be intact. But it does mean that if you change the choice, and you want the conditional logic to still work with it… you'll have to adjust any conditional logic using that choice.

    Posted 12 years ago on Tuesday April 3, 2012 | Permalink
  5. agoranet
    Member

    I don't think I outlined it very well... it does look like I added a third choice but all I did was edit the label of the first choice. After I edited it, the dropdown on the field that is using the conditional logic (based on the field I edited) shows three choices but there are only two.

    So...
    Field 1....
    Choice #1: W11 - Workshop 1 ...gets edited to W111 Workshop 1
    Choice #2: W2 - Workshop 2 ... no changed

    Field #2 which has conditional logic based on Field #1 will now show the following choices to pick from for Field #1...
    W1 - Workshop 1
    W2 - Workshop 2
    W11 - Workshop 1

    But there are only 2 choices for field #1... but the conditional logic thinks there are three

    It does seem to make a difference on fields where I have enabled values... If I edit the value instead of the label, now both the labels and values are shown to choose from and I'm not sure which I should pick.

    It always clears itself up if I just pick a different field for the conditional logic and then switch it back... I'm guessing that makes it go reload the choices and then they are always correct.

    Posted 12 years ago on Thursday April 5, 2012 | Permalink
  6. This is happening because you changed the choice labels for the choices in the drop down.

    Conditional logic is showing you both what the current choices are in the selected drop down AND what that conditional logic's current setting is.

    Because you CHANGED the labels of the choices in the drop down, what is currently selected in the conditional logic is a choice that no longer exists in the drop down. But it is still selected in conditional logic and it will still be reflected.

    This is why it's showing 3 choices when the drop down only has 2 choices. It's showing the 2 choices of the drop down AND what conditional logic is currently configured to use... which is a choice that no longer exists in the drop down.

    When you change choices in a drop down, radio button or checkbox field, it does not automatically update that choice anywhere it is used in conditional logic. You must manually change any conditional logic if you are making changes to drop down, radio button or checkbox fields that are configured to use it.

    When you change what is selected in the conditional logic and save... the "extra" option in the drop down will go away because A) it doesn't exist as a choice in the drop down and B) it isn't still selected in conditional logic so it doesn't exist in either... so it isn't displayed anymore.

    Posted 12 years ago on Thursday April 5, 2012 | Permalink
  7. agoranet
    Member

    Thanks for the explanation. As a programmer, I could have expected that the choices were all tied behind-the-scenes by an ID that doesn't change. On these long forms with many, many choices and lots of conditional logic it seems to set you up for trouble that a change in one place doesn't automatically get reflected elsewhere.

    I know what to look for now - thanks!

    Posted 12 years ago on Friday April 20, 2012 | Permalink

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