Use HTML and field values in a rich text field

Est. Reading: 1 minute
By: bchseile
Created: 09/19/2018
Category:
Difficulty: Intermediate

Use HTML and field values in a rich text field

×Warning: This tutorial was created 2065 days ago. Some of the information may be out of date with more recent versions of Formidable. Please proceed with caution and always perform a backup before adding custom code.

In my case, I had a single text field that contained a default text calculation that had HTML. When Formidable started using wp_kses to prevent unwanted HTML in fields as WordPress does, my HTML got stripped. After some investigation by Victor M Font Jr (thanks Victor), it was discovered there were not any hooks or anything available to 'undo' this.

I was trying to avoid changing my field type to HTML, as I would have had to create a whole new field and lose data for hundreds of entries.

So I changed my text field to rich text (which allows some HTML). Then I used the frm_validate_field entry to construct a string of field values and text.

This worked for me because I really did not need the field to be populated as 'default'. It was a field the users were not seeing and just needed to be populated to get passed along after the create entry/post...

If you do need to use default - you will have to do the HTML field - Javascript method as outlined in the Formidable documentation.

Leave a Reply

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crosschevron-leftchevron-rightarrow-right