Skip Navigation

[Resolved] Conditional logic issues and others

This support ticket is created 5 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

Author
Posts
#1233441

I am trying to: Starting from the "Real Estate" reference site, I'm working to build a Tourism promotion Site.
Then, for the accommodation facilities, I have created a specific CPT called "Dormire" and to this CPT I have assigned the "Strutture Ricettive" Taxonomy, and more Custom Field Groups that should be displayed by the selected categories in the taxonomy.

01 - So, the first issue I found is that in the block editor, when I add the fields in a conditional logic group and save it, when I try to display the Form, and I select the value to display the forms inside the conditional logic, the forms are not displayed. Then, when I switch to the expert mode editor in the form editor, all the fields inside the conditional logic are lost...

The first field is a checkbox list about the category of the "Strutture Ricettive" Taxonomy. The first condition I have created is that: When a category is selected display all content, like this

<div class="form-group">
		<label>[wpml-string context='cred-form-' name='Strutture Ricettive']Strutture Ricettive[/wpml-string]</label>
		
      [cred_field field='struttura-ricettiva' force_type='taxonomy' output='bootstrap' display='checkbox']
	</div>

[cred_show_group if="($(struttura-ricettiva) ne '')" mode="fade-slide"]
Display all other fields and all other fields inside other conditional logic
[/cred_show_group]

This condition works fine, and when I check a category, the fields are displayed. But, I have found another issue:

2 - The second issue that: inside of the first condition, if I want to group some fields inside others conditional logic to be displayed when a specific category is checked, in the front end, when I check the specific category, the fields inside the conditional logic are not displayed. I have tried to use different solution, by ID, by array of IDs, by slug (I have found a guide that says to use the slug mode with the checkbox field). In the simple, I have used this code:

	[cred_show_group if="($(struttura-ricettiva) eq 'affittacamere')" mode="fade-slide"]
	<div class="form-group">
		<label>[wpml-string context='cred-form-' name='Descrizione Struttura']Descrizione Struttura[/wpml-string]</label>
		[cred_field field='post_content' output='bootstrap']
	</div>
[/cred_show_group]

So, this condition logic doesn't work... why?

The other issues are about the relationship CPT post fields and the Repeatable field:

3 - In total, I have created 6 CPTs, one for the Cities CPT, and five for other types of touristic service. For the "Dormire" CPTs I have created 4 CPT's "one to many" relationships to the other tourism services. I have also created "one to many" relationship between "Cities" CPT and "Dormire" CPT. In the form creator, I can see only the Relationship field about "Cities" and "Dormire" CPTs. So, I need to have also the other Relationship field that I have created!!! What should I do to have these?

4 - About the Dormire CPT, I have created also a Custom Field Group that is a Repeteable field. For the Repeteable field, Form plugin needs me the opportunity to create a new form. Well, I have created the Form about the Repeteable field, but I don't know how I should do to insert it into the main Dormire CPT Form.

Can you help me?

Link to a page where the issue can be seen: hidden link

New threads created by Minesh and linked to this one are listed below:

https://toolset.com/forums/topic/split-checking-term-field-conditionally-with-forms/

#1233777

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

01 - So, the first issue I found is that in the block editor, when I add the fields in a conditional logic group and save it, when I try to display the Form, and I select the value to display the forms inside the conditional logic, the forms are not displayed. Then, when I switch to the expert mode editor in the form editor, all the fields inside the conditional logic are lost...
=> Can you please share problem URL and access details so I can check what's going wrong there.

Please kindly open a new ticket with every new question. This will help other users searching on the forum. I split the ticket for 2nd question. Please feel free to open a new ticket for your 3rd and 4th question.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#1234210

Hi Minesh,
this reply is not set to private and I cannot send you the access to the site.

#1234489

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

=> Can you please share problem URL and access details so I can check what's going wrong there.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

#1235651

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - I checked your form and I see that with your form there are blank conditional shortcodes:
=> hidden link

	[cred_show_group if="( $(post_title) eq '' )" mode="fade-slide"][/cred_show_group]
	[cred_show_group if="( $(post_title) eq '' )" mode="fade-slide"][/cred_show_group]
	[cred_show_group if="( $(post_title) eq '' )" mode="fade-slide"][/cred_show_group]
	[cred_show_group if="( $(post_title) eq '' )" mode="fade-slide"][/cred_show_group]

Can you please share what exactly not working with [cred_show_group] shortcode? A bit detailed explanation with a few screenshot or test case will help me to understand your issue and guide you in the right direction.

I have set the next reply to private which means only you and I have access to it.