Dear Sir/Madam,
I am going to revamp a website, I need to change the fields, for example, the name or the slug, may I know if I change it, will the data connection be lost and I can't get back the data even I change the View shortcode with a new slug?
In order not to be shown from the backend, I temporarily add the condition with never true logic to hide the fields, if I remove the custom field, will all related meta key/values be removed from the database also?
Unfortunately, there is no conditional logic setting to custom user fields, I can't hide them, please advise how I should do before I change or delete the custom field if I need to keep them as old data but just do not want to show it from the backend before I find a solution.
Best regards,
Kelvin
Hello Kelvin and thank you for contacting Toolset support.
If you change the slug of a custom field, Toolset will change it for the data in the database level(postmeta) too.
You can't hide a custom field. But you can disable a fields group. Move the fields that you want to hide to another field group, and then disable the field group. Check this screenshot hidden link
For custom user fields, you are right, there is not conditional display, but you can still move the custom fields to another/new fields group and disable it.
Please note that there is no such feature as "moving a custom field", but you can reuse the existing field in the new fields group, then remove them from the old field group. Check this screenshot hidden link
I hope this helps. Let me know if you have any questions.
Dear Jamal,
Thanks for your reply.
What will be happened from the WP database if I delete the custom fields? Should be firstly resue the existing field in the new fields group before I remove them from existing new fields group?
Best regards,
Kelvin.
Hello Kelvin, Indeed, If you first remove the custom field, it will also remove the data from the database. You should first reuse the custom field before removing it.
Dear Jamal,
If I move the existing field to another group and then deactivate it, will those records still having the connections?
Yes. Deactivating the field group will not touch the data on the database. It will remain there. And it will appear on any existing custom field(if the field is reused on another field group) that has the same slug.
Deleting the custom fields from Toolset will delete the data on the database if no other field exists with the same slug.
Dear Jamal,
OK, it is clear to understand how the Toolset manages the custom field data in the WP database, by the way, what is the best method to backup and the custom fields before I delete them?
I temporarily change the custom field name by adding (Removed) and add a customized condition so that the logic will never be true, then it will be hide from the backend post edit page, is there any other better way to disable it? Please advise.
While I edit the customized condition, I find a bug. Here are the steps I did
1. I use Advanced text mode to place a logic statement ($(valid) eq 0)
2. I change my decision, I switch it back to basic mode
3. I add the condition
4. I save the field group
5. I click the Advanced text mode again, the logic statement ($(valid) eq 0) is still there
6. I remove the logic statement and re-add the condition from basic mode, save it again
7. The Advanced text mode again is changed
It is supposed the Advanced text mode should be automatically updated when changing the condition from basic mode, am I correct?
There is no special way to backup the custom fields(data), you need to back up the whole database. Or to implement some export/import mechanism.
As I explained, disabling the custom fields is the only way to make fields hidden, while keeping their data on the database.
Yes, the text mode of conditionals should reflect the updates of the basic model, but that's not our subject here. Let's make sure we help you to "remove or suspend custom fields" without needing to use any conditions. For support rules, we are able to handle only one issue at a time. This helps us to bring you a better service and also helps other users to find all the information here exposed.
Please let me know if you are still stuck with what I have suggested?
- Create separate field groups.
- Reuse the custom fields in the new field groups.
- Disable the desired field groups.
- Remove the custom fields from the old field groups.
My issue is resolved now. Thank you!