Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

[SOLVED] Conditional fields not displaying

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
8 years 10 months ago #274824 by nant
Replied by nant on topic Conditional fields not displaying
Ok mannually turn off all your field conditions from each field and then retest to verify that everything works.

Then reconfigure each condition one at a time to see which configuration is causing the issue.

Please Log in or Create an account to join the conversation.

8 years 10 months ago #274827 by CMoorhouse
Replied by CMoorhouse on topic Conditional fields not displaying
I have figured out what it is doing but how do i resolve.

I have the same condition set up on Child No 1 Name, Child No 2 name, Child No 3 name and Child No 4 name.

I turned each off and then reset each one to on one by one, testing in between.

If like i did I only have 2 children, I complete the name fields for Child 1 and 2 and it shows me the extra conditional fields which i then complete. But i don't have a child no 3

When i revisit my account area it is hiding my completed medical fields. If i turn off the condition on child 3 and 4 it shows me those completed medical details.

How do i make it work in the above situation?

thank you
Caroline

Please Log in or Create an account to join the conversation.

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
8 years 10 months ago #274915 by nant
Replied by nant on topic Conditional fields not displaying

CMoorhouse wrote: I have figured out what it is doing but how do i resolve.

I have the same condition set up on Child No 1 Name, Child No 2 name, Child No 3 name and Child No 4 name.

I turned each off and then reset each one to on one by one, testing in between.

If like i did I only have 2 children, I complete the name fields for Child 1 and 2 and it shows me the extra conditional fields which i then complete. But i don't have a child no 3

When i revisit my account area it is hiding my completed medical fields. If i turn off the condition on child 3 and 4 it shows me those completed medical details.

How do i make it work in the above situation?

thank you
Caroline


Please describe your use case.
You have 4 text fields that you want to condition for what final result?

Please Log in or Create an account to join the conversation.

8 years 10 months ago #274921 by CMoorhouse
Replied by CMoorhouse on topic Conditional fields not displaying
If a user enters a child's name is any of the fields Child No 1 Name, Child No 2 name, Child No 3 name and/or Child No 4 name then the medical fields should be shown.

A user might enter only 1 child's name or enter more than one child's name. They might also for example enter the name in just the child no 2 field and for some reason leave the the first child field empty. Hence i want the condition to work on all 4 child's name fields.

For example if they enter a child's name in the child 1 field only it should the medical fields. If they enter it in the child 2 field only it should show the medical fields. It currently works to show the fields in this way but when you revisit the account area it hides those completed medical fields and even on editing the account/profile i can't see these medical fields.

In my testing case i have entered a child's name in fields 1 and 2 but not a child no 3 or child no 4 name. When i first register it show the medical fields correctly and i can save the profile. But when I revisit the account area it hides those completed medical fields and even on editing the account/profile i can't see these medical fields. If i login to the admin backend i can see the medical fields that were entered.

I hope this makes sense

thank you
Caroline

Please Log in or Create an account to join the conversation.

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
8 years 10 months ago #274932 by nant
Replied by nant on topic Conditional fields not displaying

CMoorhouse wrote: If a user enters a child's name is any of the fields Child No 1 Name, Child No 2 name, Child No 3 name and/or Child No 4 name then the medical fields should be shown.

A user might enter only 1 child's name or enter more than one child's name. They might also for example enter the name in just the child no 2 field and for some reason leave the the first child field empty. Hence i want the condition to work on all 4 child's name fields.

For example if they enter a child's name in the child 1 field only it should the medical fields. If they enter it in the child 2 field only it should show the medical fields. It currently works to show the fields in this way but when you revisit the account area it hides those completed medical fields and even on editing the account/profile i can't see these medical fields.

In my testing case i have entered a child's name in fields 1 and 2 but not a child no 3 or child no 4 name. When i first register it show the medical fields correctly and i can save the profile. But when I revisit the account area it hides those completed medical fields and even on editing the account/profile i can't see these medical fields. If i login to the admin backend i can see the medical fields that were entered.

I hope this makes sense

thank you
Caroline


Thanks for posting detailed use case - helps me help you ;-)

Well, main issue is that you cannot chain CB Conditionals in an OR like fashion.
So basically last condition would be enforced.

Perhaps a better approach would be to first have a number of children select field (configured maybe as a drop-down with values 0,1,2,3,4 - depending on how many children you want to support). Then just use this value to show the remaining fields independent if they have populated something in the name fields or not.

Please Log in or Create an account to join the conversation.

8 years 10 months ago #274934 by CMoorhouse
Replied by CMoorhouse on topic Conditional fields not displaying
Brilliant -thank you -all working at this end now

thank you again
Caroline
The following user(s) said Thank You: nant

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum