Put a text field shortcodes inside an html field, not post html.

By: Kimberly Hargis | Asked: 04/29/2024
ForumsCategory: How-toPut a text field shortcodes inside an html field, not post html.
Kimberly HargisKimberly Hargis asked 2 weeks ago

Hi, I have a text field ID 1179 and I need to put in inside a text that writing in an html field. Not a post html but the html field in inside the form. I tried [1179] but that didn't work. Any thoughts on how to do this? Thank you

Rob LeVineRob LeVine replied 2 weeks ago

The simple answer is "no, you cannot do that". What is your goal or use case?

2 Answers
Best Answer
Rob LeVineRob LeVine answered 2 weeks ago

One way you could do it, depending on your complete end-game is to put input elements in the HTML field. I will use [] instead of the greater-than/less-than because this forum strips HTML tags.

Example text, text text text $[input id="myDollarFied" type="text"/].

Create a hidden field(s) in the form to mirror the value(s) entered in the field and give each field a unique ID. Use jQuery to take the entered values from the input elements and write them to the hidden fields so that they'll be saved when the form is saved.

Kimberly HargisKimberly Hargis answered 2 weeks ago
Thank you, I feel better knowing it not something stupid I was missing.  My client want it formatted like "Example text, text text text $ ________. Example text, text text text text, text text text ________. Text text text text, text text text text text text text, text text text." With the form field to fill out in underline places. Looking for a way to keep it in the correct text formatting if possible. 
Bobby Clapp replied 2 weeks ago

You could have the form post to a view that does that for you but yeah, within the form itself, not without some custom code.

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
crossarrow-right