Hello. I'm trying to clear a conditional date field, but it's not working. Please see this video for more info:
versteckter Link
As always, thank you!
Hello and thank you for contacting the Toolset support.
Even though there is a display logic for the "Pre-Bid Meeting Date" field based on the "Pre-Bid Meeting" field, there is no logic that will clear the value of "Pre-Bid Meeting Date" when "Pre-Bid Meeting" is "None".
I can see two ways to resolve this issue:
- Displaying "Pre-Bid Meeting Date" conditionally based on the value of "Pre-Bid Meeting" when its value is different than "None". But this will keep the date value on the database.
- Clearing the database value for "Pre-Bid Meeting Date" when "Pre-Bid Meeting" is "None". This will require a custom to hook into the WordPress "save_post" hook. Check the solution of the following thread, it tries to calculate the value of a custom field based on other fields, it is the same logic, except that you will save an empty value for "Pre-Bid Meeting Date" when the value of "Pre-Bid Meeting" is "None".
https://toolset.com/forums/topic/calculate-value-of-a-custom-field-based-on-other-custom-fields-values/
I hope this helps. Let me know if you have any questions.
Hi Jamal. I'm not really a coder, so some of that goes over my head. I'm sorry.
However, shouldn't the "Clear" button clear out the date? That seems to be a bug with toolset. Can you get that fixed?
Thanks.
Hello,
I run a local test and I can't say it is a bug. For example, once you "Clear" the date and save, the date will be created. But if you clear it, then hide it with the condition(choosing "None" for the "Pre-Bid Meeting") and save, the date is not cleared.
So, I would not say it is a bug. Instead, it is a usability issue. So I escalated this ticket to our 2nd Tier for further evaluation and analysis.
I'll get back to you as soon as I get any feedback.
Hi Jamal. After further testing, it appears that if you edit anything hidden behind conditional logic will not save IF you hide the conditional field before saving the post. Please fix. Thank you.
Thank you for sharing your findings. I escalated your reply as a note on our internal tracking tool. We'll get back to you as soon as possible.
Hello there! I am happy to tell you that this issue has been fixed in this week's update(Toolset Types 3.4.13). Our sincere apologies for the long time it took.
Please follow this article to automatically update the Toolset plugins. ** Make a full backup before updating the production site. **
https://toolset.com/faq/how-to-install-and-register-toolset/