Skip Navigation

[Resolved] Conversion of fields

This thread is resolved. Here is a description of the problem and solution.

Problem:
How to convert a Types WYSIWYG field to a simple multiline text field?

Solution:
It's not possible, for the reasons outlined below.

You need to delete the WYSIWYG field and make a new multiline field.

This support ticket is created 6 years 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

This topic contains 2 replies, has 2 voices.

Last updated by andrewB-7 6 years ago.

Assisted by: Nigel.

Author
Posts
#696778

Hi there,

Is it possible to convert an existing Types custom WYSIWYG fields into a multiline text field, without losing all of the content in previously submitted posts?

We want to stop people having front end formatting abilities.

Many thanks for your time,
Andrew.

#697572

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Hi Andrew

If you simply delete the custom field from Toolset > Post Fields while editing the post field group it will remove the custom field without removing the existing data.

However, you won't be able to re-use the same slug for the new field, so the data will effectively be hidden.

On the page Toolset > Post Fields you should note at the bottom there is a button "Post Field Control".

That gives you the option to delete a field which enables you to re-use the slug, but it deletes all the post meta, too.

There is an option to stop using Types to manage a custom field which won't delete the data, but that still won't let you use the same slug.

This is a roundabout way of my saying it's not possible.

The only way you could get this to work would be to stop managing the field with Types, run a script to rename the key of the field in question in wp_postmeta so that the same slug became available when you make a new field of the required type, and then run another script to rename the key back to its original value.

However, I can't recommend that because there may be problems with the content. A WYSIWYG field allows HTML elements that a multiline field does not, for example.

#697886

Thanks Nigel, I really appreciate the thorough response.

Very best wishes,
Andrew.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.