I have added this thread into our to-do list, will update here if there is any news.
Currently, you can consider to setup the taxonomy field as single select field, for example:
[cred_field field='listing-category' force_type='taxonomy' output='bootstrap' display='select' single_select='true']
then the [cred_show_group] shortcode will be able to work.
I need to use multiselect field so setting up as a single select field will not work for my purposes. And that post you referenced is a year and a half old, so if a simple bug like this is going to go unfixed for 18 months... well I'm disheartened. Actually it seems you guys are working on features for a minority if your use base(Blocks and Layouts) at the moment and letting so many important update and issues like this fall through the cracks. Or am I missing something?
What about the other issue I mentioned? This is actually even more critical as data is being deleted due to the cred_show_group functionality:
"Also the other issue I mentioned previously still occurs, if a non Spa category is selected and the form is saved. Then a Spa category is selected and the for is saved again the fields that were previously saved in those custom fields are gone. It's as if the cred_show_group when it hides then shows clears out checkboxes fields."
For the question:
if the Spa category is deselected from from the Edit form, and then re-selected, the checkbox selections within that hidden area get cleared out, the data is lost.
I have tried it in my localhost with a fresh WordPress installation:
If I select the speicifc option "SPA", enable some options in the checkboxes field, and deselect that option, it works fine, I can the options in options in the checkboxes field are selected.
Then I checked it in your website, it seems that you have already changed the form settings, I don't see any checkboxes insider [cred_show_group] ... [/cred_show_group].
I assume we are talking about this:
Select the option "SPA", enable some options in the checkboxes field "style-of-spa-or-massage-business", and deselect "SPA" option, it will disable the checkboxes field within by adding "disabled" attributes to those checkboxes, you can check inspect the element attribute with Chrome browser, so when you submit the post form, it won't submit checkboxes field "style-of-spa-or-massage-business" data, so it is expected result:
the checkboxes field "style-of-spa-or-massage-business" are gone.
Please confirm it is the same issue as you mentioned above, thanks
I think there might be some confusion, but I'm not sure, I will make a screencast to show the issue more clearly:
hidden link
If that is an expected result then there is a serious problem, would that really be the behavior you expect? You switch one field/taxonomy and other fields are completely cleared from the database? No way.
Also I'd really like to know why after 18+ months the first issue is still unresolved. It's important I know what is prioritized to know if I need to find other plugin solutions.
Thanks for the video, that is the same issue, if you deselect those "spa" term, those hidden checkboxes fields "spa & massage details" will be disabled, and disabled form element won't be submitted, so it is expected result.
See the document I mentioned above: hidden link Tip: Disabled <input> elements in a form will not be submitted!
For the question: Also I'd really like to know why after 18+ months the first issue is still unresolved.
By default, when you add conditional group into Toolset forms, there isn't any option to use taxonomy field, see screenshot: field.JPG
And it is still in our to-do list, I am not sure when will it be fixed.
In your case, you can consider custom JS codes, for example, I have done below modifications in your website:
1) Edit the post form "TEST form for toolset - delete when done", in section "JS Editor", add below JS codes:
But I'm still confused with the idea of "disabled". You said once disabled then they are not submitted. If they are not submitted then how can their values be cleared out? This doesn't really make sense.
I really just want to show/hide these elements as normal toggles work. I think most people would assume the "cred_show_group" functions like a toggle switch. If not is there anyway to have it work like that?
Q1) If they are not submitted then how can their values be cleared out? This doesn't really make sense.
I can duplicated the same problem when use custom checkboxes field "spa & massage details" insider shortcode [cred_show_group] ... [/cred_show_group], but there isn't the same issue for other field types, for example single linge field radio field.
Can you confirm it? The custom checkboxes field is a specicial field type of Toolset plugins, it might be designed as that.
Q2) If not is there anyway to have it work like that?
No, [cred_show_group] shortcode works as I mentioned above:
if you deselect those "spa" term, those hidden checkboxes fields "spa & massage details" will be disabled, and disabled form element won't be submitted
Yes, I can confirm. It seems only the custom checkbox fields get cleared/deleted. Other fields do not. So it would seem this is a bug right? No field should get deleted.
I would like to also update you about conditional statement with your multiple select fields which is not working as expected and that is also known to us. We already escalated the issue in front of our Devs and I will get in touch with you when I get any updates on that.
Thanks for that js workaround but it seems it does not work if multiple categories are selected. When I look at the code those || Or statements should allow multiple category selections to still activate "show"... hmmmm,
I'm not sure where its not working. On this page: hidden link
The following form is used:
=> hidden link
Where I've added the workaround code-shared by Luo.
And I I select multiple categories from the multi-select dropdown for the "Spa and Massage" I can see the div and if I select only "Spanish" I can see the section is not displayed.