Skip Navigation

[Resolved] I can't display in form, custom fields conditional to a taxonomy-category option

This support ticket is created 5 years, 9 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 12 replies, has 2 voices.

Last updated by Shane 5 years, 9 months ago.

Assisted by: Shane.

Author
Posts
#1195348

I am trying to:
Display in a front end add new post form , custom fields conditional to a taxonomy-category option and it does not work

Link to a page where the issue can be seen:

I expected to see:

Instead, I got:

#1195592

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Valentine,

Thank you for contacting our support forum.

The taxonomy categories on the taxonomies are custom fields on the taxonomy term ?

Is this what you are referring to, if so then the taxonomy meta on the form custom fields wont work.

Please let me know if this is what you are referring to .

Looking forward to hearing from you soon.

Thanks,
Shane

#1195844

Hi Shane,
No, the issue is more simple.
I have a taxonomy (with two values only "Buy" and "Sell") associated to CPT and I would like to display (in an Add New Post Form) two custom fields of the same CPT, conditional to the taxonomy. Example: If within the form, the user select the Taxonomy "Buy", then a custom field called "Buy goods" to appear in the form, while selecting taxonomy Sell to appear just the custom filed "Sell Goods"
When I go to Add Conditional Group, I do not find the Taxonomy there, but just the fields.
Any shortcodes I found on the support did not work.
Please advice, thx

#1195998

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Valentin,

Thanks for the clarity I did some test on this and I can verify that this does not work as intended.

However I was able to get it to work under a very specific condition. On your taxonomy in the edit form page you will need to change display="checkbox" to display="select". This will change the field to a select.

Next thing is that instead of using the slug or name of the taxonomy term, you will need to use the ID of that term in the conditional group. Here is an example below.

[cred_show_group if="( $(category) eq '35' )" mode="fade-slide"]<div class="form-group">
		<label>WYSIWYG</label>
		[cred_field field="wysiwyg" force_type="field" class="form-control" output="bootstrap"]
	</div>[/cred_show_group]

So as you can see i'm checking the category taxonomy if the user has selected the term with ID 35. Now you can find the ID of the term when you go to your Post Type -> Taxonomy Name and then clicking on the term to go to it's edit page.

If you look in the URL you will see a parameter called tag_ID and this should give you the ID of the term.

I'll open a ticket with our 2nd tier support for further clarity and debugging on this one for you.

Thanks,
Shane

#1196119

Hi Shane, still does not work. Waiting for your response after you get a solution from the 2nd tier support, thx

#1196142

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Valentin,

The news on this one is not so good.

It is actually a known issue by our development team, from what I see on our internal ticket on the issue, the fixed version is set to version 2.3 of Toolset Forms.

I'm not sure when this one will actually be fixed but my workaround works well locally.

Could you possibly send me a link to the form so that I can see exactly what we are working with ? Hopefully we can get to a workable solution.

Thanks,
Shane

#1196244
Screen Shot 2019-02-05 at 19.43.35.png
Screen Shot 2019-02-05 at 19.44.58.png

Hi Shane, attached are the printscreen of what I would like to do. If in the add new form the taxonomy (select) is Buy (id:1032), then to display a text or do anything else related to custom fields/display one , appreciate your availability to support
thx .V

#1196281

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Valentin,

Your setup is in fact exactly as I described it.

Mind if I could log in to double check just to ensure that everything is ok ?

If i'm able to log in I can have a better look at this for you .

Looking forward to hearing your response.

Thanks,
Shane

#1199256

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Valentine,

Thank you for the credentials but it seems you site is on a private server so I would need access to this as well because i'm getting the login prompt when visiting the link.

I'll enable the private fields once more.
Thanks,
Shane

#1199276

Hi Shane, sorry that I forgot there is a server password, below are the details
user: enter
password: zaq098&
In the meantime our IT deleted the test form, but please create a simple test one that can execute that task and that will be fine for us, thanks a lot

#1199334

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Valentin,

Thank you i've checked this for you and was able to see that it is in fact not working.

I would suggest waiting for a fix for this as I made you aware that our development team is working on this and could revamp this entirely.

Is it possible to trigger your field based on another item ? Such as a custom field? This could serve as a workaround for you until this is fixed.

Please let me know.
Thanks,
Shane

#1201465

Hi Shane, do you have any idea if the issue was fixed in the last update? thx

#1202527

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Valentin,

I checked again on this as I see that i had previously advised that this will be fixed in version 2.3

However on our system it seems they moved it to version 2.3.1

Thanks,
Shane