Group showing when Not meant too
-
Hi,
I have been trying to wrap my head around an issue I’ve been having lately, but can’t seem to find a solution.
To summarise. Essentially, groups are showing that are dependant if a checkbox is “not equal” to “” (blank/no value).
This was generally working well. But lately, I have noticed it is not working very well.On the website, under Order Forms > Cupcake Order Form.
I should first click Standard Cupcake (or mini cupcake), then Quantity, then show me the checkbox options for flavours. After I select a flavour, it should then show me the patty cases section. But it is showing the patty cases after I select Quantity.
I have combed over the Conditional Fields tab to make sure everything is correct. But can’t see a problem.
Any ideas?
I can’t attached a picture (of conditional fields sections) by the looks of it.If you have a way I could do that, let me know.
Thank you for your time looking at my post.
The page I need help with: [log in to see the link]
-
I can’t attached a picture (of conditional fields sections) by the looks of it.If you have a way I could do that, let me know.
You could paste an export of your conditions here
I see one (maybe unrelated) problem immediately after checking your conditions in the source code of the website.
—> It looks like you are settingcheckbox-flavours
to""
instead of just leaving it blank.The form seemed to work fine at first, but I found a case in which it failed.
If you choose mini cupcakes, then select an amount, the
flavours-mini
group shows up. Which is fine. However If you then deselect and reselect Mini Cupcake, the amount seems to be present but theflavours-mini
group does not show up. The problem comes from the select field. It’s a custom select field, introduced by your theme I believe, it’s not compatible with the plugin.A quick work-around would be to remove the clear_on_hide from all your groups. Please give that a try.
-
This reply was modified 4 years, 11 months ago by
Jules Colle.
Hi Jules,
Thank you for replying.
I did set checkbox-flavours to “” as a test. But when I saved it, the cells just goes blank. I just went through and selected every checkbox-flavours and made them blank.
I removed all the clear-on-hide from the groups. That did help with the mini-cupcake selection you found. Thanks for that.
I am still having the issue with the group-cases appears when the quantity is selected, which should only show the group-flavours. Then once a flavour checkbox is selected, then the cases should show.
Could you please explain what you mean by “The problem comes from the select field.” I presume the select field is the checkbox select fields in this case.
Below is the text view of the conditional fields.
show [group-allergies] if [gfdf-checkbox] equals “Allergies”
show [group-delivery-address] if [checkbox-collection] equals “Delivery”
show [group-quantity-cupcake] if [checkbox-type] equals “Standard Cupcake”
show [group-quantity-mini-cupcake] if [checkbox-type] equals “Mini Cupcake”
show [group-flavours-standard] if [select-quantity-standard] not equals “”
and if [select-quantity-standard] not equals “more (+$20/6)”
and if [checkbox-type] equals “Standard Cupcake”
show [group-quantity-more] if [select-quantity-standard] equals “more (+$20/6)”
and if [checkbox-type] equals “Standard Cupcake”
show [group-flavours-mini] if [checkbox-type] equals “Mini Cupcake”
and if [select-quantity-mini] not equals “more ($1.50 each)”
and if [select-quantity-mini] not equals “”
show [group-quantity-more-mini] if [select-quantity-mini] equals “more ($1.50 each)”
and if [checkbox-type] equals “Mini Cupcake”
show [group-flavours-standard] if [text-quantity-more] not equals “”
and if [select-quantity-standard] equals “more (+$20/6)”
and if [checkbox-type] equals “Standard Cupcake”
show [group-flavours-mini] if [text-quantity-more-mini] not equals “”
and if [checkbox-type] equals “Mini Cupcake”
show [group-plaque-yes] if [checkbox-plaque] equals “Yes”
show [group-order-done] if [checkbox-cases] not equals “”
and if [checkbox-plaque] equals “Yes”
and if [text-plaque-text] not equals “”
and if [text-plaque-colours] not equals “”
show [group-order-done] if [checkbox-cases] not equals “”
and if [checkbox-plaque] equals “No”
show [group-cases] if [checkbox-type] equals “Standard Cupcake”
and if [select-quantity-standard] not equals “”
and if [checkbox-flavours] not equals “”
show [group-plaque] if [checkbox-cases] not equals “”
and if [checkbox-flavours] not equals “”
and if [select-quantity-standard] not equals “”
and if [checkbox-type] equals “Standard Cupcake”
show [group-cases] if [checkbox-type] equals “Mini Cupcake”
and if [select-quantity-mini] not equals “”
and if [checkbox-flavours-mini] not equals “”
show [group-order-done] if [checkbox-type] equals “Mini Cupcake”
and if [select-quantity-mini] not equals “”
and if [checkbox-cases] not equals “”
and if [checkbox-flavours-mini] not equals “”Thank you.
Hi Jules,
I now understand what you meant by the select field. The dropdown menu boxes.
I doubled checked by adding a new dropdown-menu from the options and found that it is meant to be in format:
[select menu-86 “Cheese”]
Mine was in format:
[select select-86 “Cheese”]Unsure why that happened. I presume I messed that up adding in manually.
I still have the problem though even after changing them from select to menu.
I still don’t understand what you mean by: “The problem comes from the select field. It’s a custom select field, introduced by your theme I believe, it’s not compatible with the plugin.” How is the theme conflicting with the CF7 form in this case? Is it meant to be showing something other than [select menu….]?
To me, this issue somehow lays with the checkboxes not recognising there isn’t anything selected. But I’m not an expert, just an observation.
So then started from scratch by clearing all conditional fields options.
*This example is on the Cookie Order Form now as it was easier to clear them all and recreate the flow.
Still showing
group-packaging
ifgroup-flavours-chip
doesn’t have a checkbox ticked.
When I tick the “CUSTOM Flavour” checkbox, it clears thegroup-packaging
, shows the text box oftext-custom-chip
, then once text is in that box, shows thegroup-packaging
. This is working correctly, but not the other ones.I thought maybe it was because there was too many options, so I removed all but 3 options. Made no difference, so that wasn’t the issue.
I didn’t add the text code here as I am working on it now trying to solve it and debug what’s happening.
Sorry for asking many questions. I really don’t know where I am messing this up. Thanks again for any help and taking time to assist.
-
This reply was modified 4 years, 11 months ago by
bigfootwebdev.
Not to add more replies to the forum, but thought I would share something I just stumbled upon.
I was looking at my other order form pages, and each case when a checkbox occurs, if there is anything that follows in in terms of conditional groups (weather that be a dropdown menu, a text/text area, or another checkbox), the item after it appears even if the checkboxes have nothing selected (when they are meant to have something before showing the next group).
I don’t recall this always happening.
I have the latest version of WordPress, CF7 and Conditional Fields (FYI).Does this help in a solution?
Thanks again Jules. I do love the plugin, just can’t work this one out.
-
This reply was modified 4 years, 11 months ago by
bigfootwebdev.
can you try and switch to another theme, just to verify its not that?
next, also double check to see if all your field names are unique. (you can’t have 2 fields or groups with the same name)
I switched to the Twenty Twenty theme, currently live on the website.
It is still doing the same thing on multiple contact forms with conditional fields.
I can leave it on the new theme for a while until you reply, so you can see it yourself.
Thank you.
Field names are unique as well.
Everything seems to be working fine. I just checked your conditions for the
[group-packaging]
group, and when I make sure all of them are met in the form, I see the[group-packaging]
showing up.show [group-packaging] if [checkbox-flavours-chip] not equals "" and if [menu-quantity-chip] not equals "" and if [checkbox-type] equals "Chip Cookie" and if [checkbox-flavours-chip] not equals "CUSTOM Flavour"
Still showing group-packaging if group-flavours-chip doesn’t have a checkbox ticked.
Look at the first rule, this is exactly what is supposed to happen.
I still believe you just need to wrap your head around the logic and check your implementation. Start with a super small form, with just one or 2 conditions, and gradually add more, until you get to a point where something happens that you believe is not working. Then come back here and post your form code and conditions and explain what you would like to happen.
Good luck!
:EDIT:
oh wait, I spoke too soon.. It’s a pretty complex form to wrap my head around. I think I see the gist of the problem. I’m going to create a small form myself to see if you’re on to a bug here..
-
This reply was modified 4 years, 11 months ago by
Jules Colle.
-
This reply was modified 4 years, 11 months ago by
Jules Colle.
Ok, so I figured it out.
not equals ""
will not work for a group of checkboxes, as you can see here:
https://conditional-fields-cf7.bdwm.be/form-tester/?formcode=%5Bcheckbox+s+id%3As+%22one%22+%22two%22+%22three%22%5D%5Bgroup+some-selection%5Dsomething+selected%5B%2Fgroup%5D&mailbody=&conditions=show+%5Bsome-selection%5D+if+%5Bs%5D+not+equals+%22%22However
not empty
will work:
https://conditional-fields-cf7.bdwm.be/form-tester/?formcode=%5Bcheckbox+s+id%3As+%22one%22+%22two%22+%22three%22%5D%5Bgroup+some-selection%5Dsomething+selected%5B%2Fgroup%5D&mailbody=&conditions=show+%5Bsome-selection%5D+if+%5Bs%5D+not+emptynot empty
is a feature only available in conditional fields pro, though.That form-tester is quite a handy tool. Well done on the development of that.
It did help explain it a bit.Good find, didn’t know as I don’t have the pro version (as you would know).
An amazing plugin mate, and a great developer you are.
I sent an email will a couple follow up questions if you don’t mind.
Thanks again.
Cheers. -
This reply was modified 4 years, 11 months ago by
- The topic ‘Group showing when Not meant too’ is closed to new replies.