Skip Navigation

[Resolved] Multiple issues with post form

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)

This topic contains 9 replies, has 2 voices.

Last updated by NathanG920 1 year, 9 months ago.

Assisted by: Minesh.

Author
Posts
#2578997
CSS On Old Site.png
CSS On New Site.png

Tell us what you are trying to do?

I'm having an issue with a post form created using Toolset. The first issue that I can't seem to figure out is related to a conditional display but based on a Taxonomy. I can't use the GUI editor as the taxonomies aren't displayed in the list, so I have to enter them manually.
Just to give more of a background: The post type is "Members" with the slug being "member", and then there's a Taxonomy called "Membership Types", which has a few options like "artisan, local, foreign" etc. I've tried all sorts of different variations of the code from the documentation but I can't seem to get it to run correctly. The one that seems like it should work is:

[cred_field field="membership-type" post="members" value=""]
 
[cred_show_group if="($(membership-type) eq 'artisan') OR ($(membership-type) eq 'foreign') OR ($(membership-type) eq 'local')" mode='fade-slide']
 
<!-- content to be shown only when "membership-type" field value is 'artisan, local, or foreign' inside here -->
 
[/cred_show_group]

I've tried a whole bunch of variations and none of them seem to work, I'm wondering where I'm going wrong (just for the record, these are checkbox fields), I've also tried to change the slugs for 'artisan,foreign' etc. into the ID's but that doesn't seem to work either, so I'm lost at this point.

The second problem I'm having is CSS styling the outputted form on the front-end. I've used the same technique before on another site, and for some reason there every checkbox field has it's own unique tag, like ".form-group-regions", but on the new site all the fields have the same tag of ".form-group" and no individual tag, so I can't style them individually, which is a bit of an issue when I'm trying to apply styling to say checkbox fields only but it's applying to everything on the form. I've attached two images as an example of the difference between the sites, so any help with either issue would be super appreciated.

Is there any documentation that you are following?

https://toolset.com/documentation/programmer-reference/forms/cred-conditional-display-engine/

#2579157

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

There is a known issue when you use multiple terms with the form conditional display.

Can you please share problem URL where I can see the form as well as admin access details and let me review your setting and see if I can share any possible workaround.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) 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.

#2583487

Minesh
Supporter

Languages: English (English )

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

Thank you for sharing admin access details.

Can you please share problem URL where on what URL you added the form on frontend?

#2584023

Hi Minesh,

Sorry for the delay, just had to make an associated membership profile for you to view the form. You should see it on the front-end at this link:

hidden link

#2584033

Minesh
Supporter

Languages: English (English )

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

Could you please check now: hidden link

I've added the following code just before the form's submit button shortcode in the form editor:
=> hidden link

<div class="form-group">
		<label for="%%FORM_ID%%_membership-type">[cred_i18n name='membership-type-label']Membership Types[/cred_i18n]</label>
		[cred_field field='membership-type' force_type='taxonomy' output='bootstrap' display='checkbox']
[cred_field field="membership-type_add_new" taxonomy="membership-type" type="add_new"]
	</div>
[cred_show_group if="($(membership-type) eq 'Artisan') OR ($(membership-type) eq 'Foreign') OR ($(membership-type) eq 'Local')" mode='fade-slide']
  
 content is selected either Artisan, Foreign or Local
  
[/cred_show_group]

I can see now it works as expected. When you are trying to compare the taxonomy which is hierarchical you will have to use the term name for comparison instead of term slug or term ID.

#2584045

Hey Minesh,

It does seem like it works now, which is great, thanks so much for sorting it out so quickly. Just a few lingering questions though:

1: Is there no way to make it work in the post form editor itself? Obviously it's great that it's working, but it would be preferable to do it inside the form editor just for the sake of keeping track of everything, but is it only possible to accomplish it with the shortcode workaround?

2: How would I chain multiple conditions with this fix? The condition I posted was just one of a few I'd like to implement, so if it has to go through a more custom route to accomplish I'm not sure how to adjust your workaround code if I added more conditions.

3: Is there any input on the second issue I had regarding the CSS in my original post? Still haven't figured a workaround on how to style it differently with the newer version.

#2584059

Minesh
Supporter

Languages: English (English )

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

1: Is there no way to make it work in the post form editor itself? Obviously it's great that it's working, but it would be preferable to do it inside the form editor just for the sake of keeping track of everything, but is it only possible to accomplish it with the shortcode workaround?
==>
There is no way to select taxonomy using GUI so in your case its better you should go with the shortcode workaround.

2: How would I chain multiple conditions with this fix? The condition I posted was just one of a few I'd like to implement, so if it has to go through a more custom route to accomplish I'm not sure how to adjust your workaround code if I added more conditions.
==>
you will have to just add another condition or [cred_show_group] shortcode for your other conditions.

3: Is there any input on the second issue I had regarding the CSS in my original post? Still haven't figured a workaround on how to style it differently with the newer version.
==>
As per our support policy - we entertain only one question per ticket. This will help other users searching on the forum as well as help us to write correct problem resolution summery. May I kindly ask you to open a new ticket with every new question you may have.

Thank you for understanding.

#2584091

I see, thanks very much for the detailed explanations.
Just two last questions:

1: Does the form need to be in expert mode for this to work? I usually prefer the GUI editor but i noticed it's been changed to expert mode. I'm not sure if you did this just to investigate more in-depth or if that's necessary for the function to work.

2: If it is in the GUI editor, is it still not possible at all just to use the code by using the conditional group and then going into 'Edit conditions manually'? It seems like the intention there is to reproduce the effect, but is that feature not working?

Thanks again for all the assistance and responding so quickly.

#2584105

Minesh
Supporter

Languages: English (English )

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

1: Does the form need to be in expert mode for this to work? I usually prefer the GUI editor but i noticed it's been changed to expert mode. I'm not sure if you did this just to investigate more in-depth or if that's necessary for the function to work.
==>
Yes, you have to use the "Expert Mode" in order to edit the form content as using GUI there is no way to add taxonomy with conditional display.

2: If it is in the GUI editor, is it still not possible at all just to use the code by using the conditional group and then going into 'Edit conditions manually'? It seems like the intention there is to reproduce the effect, but is that feature not working?
==>
Yes, that is known to us and we will try to improve there but there is no ETA when the fix will be offer for that.

That is why I suggest you should go with "Expert Mode" that will offer you more flexibility compare to GUI.

#2584119

My issue is resolved now. Thank you!