Skip Navigation

[Resolved] Conditional Group Does Not Work

This support ticket is created 2 years, 7 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
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9: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: Africa/Casablanca (GMT+00:00)

This topic contains 10 replies, has 2 voices.

Last updated by himanshuS 2 years, 7 months ago.

Assisted by: Jamal.

Author
Posts
#2171589

I am using the following code to show a field based on another field. But, the field in the conditional group does not become visible based on logic. What could I be missing?

	<div class="form-group">
		<label for="%%FORM_ID%%_remote-position">[cred_i18n name='remote-position-label']Remote Position?[/cred_i18n]<span class="red-color">*</span></label>
		[cred_field field='remote-position' force_type='field' class='form-check-input' output='bootstrap']
	</div>
[cred_show_group if="( $(remote-position) eq 'No' )" mode="fade-slide"]
	<div class="form-group">
		<label for="%%FORM_ID%%_job-location">[cred_i18n name='job-location-label']Job Location[/cred_i18n]<span class="red-color">*</span></label>
		[cred_field field="job-location" force_type="field" class="form-control" output="bootstrap"]
	</div>
[/cred_show_group]

#2171887

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

Would you allow me temporary access to check this form closely? Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **

Please share direct URLs to the form and where it is being used.

#2172779

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

It seems that the provided user does not have access to the admin area. When I try to access /wp-admin, I get redirected to the login page. Can you double-check from your side?

#2172853

First login with the details I provided and then use this -
homeurl/wp-admin/users.php?role=subscriber

#2173107

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

I am sorry, I got confused, the provided form does not contain any conditional groups hidden link

Please help me to find it.

#2174163

Please try with post=29259

#2174225

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

This issue happens most probably because of this Javascript error hidden link

This also happens most probably because of an optimization plugin that concatenates Javascript files. Check this article about it https://toolset.com/faq/how-to-use-optimization-plugins-with-toolset/

So, I deactivated WP-Optimize, but it did not help. And I deactivate SiteGround Optimizer, but it did not help either. That error was removed, but other errors have appeared.

Then, I deactivated all plugins except Toolset ones, and I switched to 2021, and the issue was not reproducible anymore. Check this private page hidden link

Please, enable your theme, and the plugins one at a time to track where the incompatibility is produced. And let us know what you will get.

#2174273

Thanks for looking into the issue.

1) The screenshot for the JS is not visible. Can you please repost a link?
2) The formatting of the whole site is lost now. I have other people working on the staging site and now they can't do anything because the formatting is lost even after I activated all the plugins.

Did you make any other changes that would do this?

hidden link

#2174279

I was able to solve the issue in the production environment by disabling JS defer on the page but my staging environment is still twisted.

#2174349

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

Awesome, I am glad I could help to fix the issue on the production site.

Please check the screenshot with this other URL hidden link The first one works for me and gets me redirected to this second one.

Regarding the staging site, I think that it is because you did not switch the theme. I tried to switch to the Astra child theme but it is generating issues. hidden link

To fix it, use FTP and rename the child theme folder. That way, WordPress will disable the theme and will let you choose the Astra theme on the backend.

My sincere apologies for the inconvenience. Please let me know what you will get, or update the credentials with FTP access and I'll fix it for you.

#2176407

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.