Skip Navigation

[Resolved] Change custom field with type WYSIWYG into textarea

This support ticket is created 5 years, 2 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.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 2 replies, has 2 voices.

Last updated by roulartaM 5 years, 2 months ago.

Assisted by: Minesh.

Author
Posts
#1376909
description.PNG

At first, I had a custom post type with a custom field called 'description' (type = WYSIWYG). That custom post type was originally only edited in the admin.

Now there should be a client login with CRED and the possibility that the client can change that custom post type. The custom field 'description' may not be a WYSIWYG field anymore because the clients surely will make a coloring book of the existing input.

As I can see, it's not possible to change the type of the 'description' custom field anymore.

My question: can I remove the 'description' field as a custom post type and then add it again as a textarea without losing the input that have been done before? Or will I lose all the input?

If I would lose that input: is there another solution for my problem? Should I hide all buttons etc with CSS 'display: none'?

#1377091

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

With Types, as you know, acknowledged, you can not change the field type.

Now there should be a client login with CRED and the possibility that the client can change that custom post type.
==>
I do not get this. Do you mean that when client will login he is allowed to change the post type of the post he should edit currently?

The custom field 'description' may not be a WYSIWYG field anymore because the clients surely will make a coloring book of the existing input.
==> sorry, I do not get this what you try to say. Do you mean that you do not want client to offer styling options?

My question: can I remove the 'description' field as a custom post type and then add it again as a textarea without losing the input that have been done before? Or will I lose all the input?
==>
Deleting fields will remove them from all groups and delete the field data from the database as well. So if you want that field data should be remain saved, deleting the field is not an option.

Also, you mean that the user will be able to access the WYSIWYG field on the frontend - correct? if this is correct, and if you do not want to delete the field, this applies to form only, then you can change the [cred-field] shortcode that displays your description field within your form to Generic field and try to check if that helps.

[cred_generic_field field="wpcf-description" post="post"  type="textarea" class="" urlparam=""]
{
"required":0,
"validate_format":0,
"persist":1,
"default":""
}
[/cred_generic_field]
#1377213

The [cred_generic_field] shortcode did the trick, thanks! 😉