[Resolved] Possible to change data type of a custom field?
This thread is resolved. Here is a description of the problem and solution.
Problem:
Possible to change data type of a custom field?
Solution:
To change the data type of your custom field, you should navigate to:
=> Toolset => Custom Fields => Edit your custom field group that holds your desired field => change the Field Type to "Single Line" for the field for which you want to change the data type and save the custom field group.
Relevant Documentation:
This support ticket is created 2 years, 5 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.
I need some advice on the best way in Toolset to change the data type of a custom field, (if that is possible).
Our scenario is the following: we use a Post Form to request a user's address. We currently have a numeric field for House Number, however, some people's house numbers are alphanumeric, eg 15a.
Is it possible to change the data type from numeric to alphanumeric, and if not, what is the recommended way to proceed without losing customer data? At the moment, we have a small number of production users, so I would like to get this changed asap before the problem gets bigger... 🙂
Hello. Thank you for contacting the Toolset support.
To change the data type of your custom field, you should navigate to:
=> Toolset => Custom Fields => Edit your custom field group that holds your desired field => change the Field Type to "Single Line" for the field for which you want to change the data type and save the custom field group.
I hope the solution shared above will help you to resolve your issue.
That's what I wanted to do, but I remember not being able to do that in the past.
1) Has that been changed in a recent plugin update?
2) Is it guaranteed that any information entered previously won't disappear by changing the data type?
3) Do any changes need to be done in Post Forms referencing the field?
As you can see with the following screenshot, based on your current field type, it will automatically set "not allowed" text to field type to which you can not convert.
- hidden link
1) Has that been changed in a recent plugin update?
==>
No
2) Is it guaranteed that any information entered previously won't disappear by changing the data type?
==>
It should not but in any case, you should keep full backup of your database as in any worst situation you have backup and you can restore it.
3) Do any changes need to be done in Post Forms referencing the field?
==>
I dont think so but once you change the data type of your field, you should try to remove the current field from your form and save the form and add the field again to your form to ensure it will have new data type.