Skip Navigation

[Resolved] Display of field on front end without WYSIWYG options

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

Problem:
How to display post body field with CRED form without WYSIWYG editor options

Solution:
You should use CRED generic field in order to display the post body field without WYSIWYG editor options

You can find proposed solution, in this case, with the following reply:
https://toolset.com/forums/topic/display-of-field-on-front-end-without-wysiwyg-options/#post-696606

Relevant Documentation:
https://toolset.com/documentation/user-guides/inserting-generic-fields-into-forms/

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
- 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 5 replies, has 2 voices.

Last updated by Minesh 6 years ago.

Assisted by: Minesh.

Author
Posts
#696238
Screen Shot 2018-04-20 at 09.43.47.png
Screen Shot 2018-04-20 at 09.43.32.png

Hi there.

I am trying to display a form on the front end which allows entries to a custom post type. I know how to do this, but there is something I'd like to alter and I can't find how to do this.

First of all, please make reference to the two attached screenshots. The first shows the code in the CRED post form editor, and the second shows what is output on the front end form.

It is a simple form which allows people to fill out the post title, post content, featured image and post tags, there are no custom fields involved.

The field in question here is the Post Content field. That is the one I am trying to alter.

What we need to do is to make sure that users on the front end do not have access to the WYSIWYG formatting options. We need this to be a simple multiline text field.

Is there a setting I can change, perhaps in the "output" property, which might allow this to happen?

Thanks so much for your time, and very best wishes,
Andrew.

#696515

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Well - You should add the Generic field to your form to replace the default post content field with textarea field.

For example:

[cred_generic_field field='post_content' type='textarea' class='' urlparam='']
{
"required":1,
"validate_format":0,
"default":"",
"persist":1
}
[/cred_generic_field]

More info:
https://toolset.com/documentation/user-guides/inserting-generic-fields-into-forms/

#696604

Hi Minesh,

Many thanks for getting back to me.

To be clear, we need the post content to be filled from the front end. This form is adding more posts to an existing post type which already has over 400 entries. And those posts display the post content on the front end. So new entries also need to complete that field.

Will your method still feed into the post content in the database?

#696606

Minesh
Supporter

Languages: English (English )

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

Well - It should be saved to database automatically. Please make sure that the generic field should be added with "post_content" as field name.

If you are using Edit post form where you want to display the post body content - you should use the following code:

[cred_generic_field field='post_content' type='textarea' class='' urlparam='']
{
"required":1,
"validate_format":0,
"default":"[wpv-post-body view_template="None"]",
"persist":1
}
[/cred_generic_field]
#696649

Thank you so much! I'll try this on the site today and get back to you wit any issues.

#696762

Minesh
Supporter

Languages: English (English )

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

Ok fine - thank you.

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