Change text color paragraph fields

By: lars Skov | Asked: 05/17/2022
ForumsCategory: How-toChange text color paragraph fields
lars Skov asked 2 years ago
Hi I want the text in paragraph field to be written in red text when the customer writes in it and that it is also included as red text in the email. How do I write¬† it in "customize html"? The paragraph fields html code looks like this:   <div id="frm_field_[id]_container" class="frm_form_field form-field [required_class][error_class]">
<label for="field_[key]" id="field_[key]_label" class="frm_primary_label">[field_name]
<span class="frm_required" aria-hidden="true">[required_label]</span>
</label>
[input]
[if description]<div class="frm_description" id="frm_desc_field_[key]">[description]</div>[/if description]
[if error]<div class="frm_error" role="alert" id="frm_error_field_[key]">[error]</div>[/if error]
1 Answers
Victor Font answered 2 years ago
You do not have to customize the HTML. A simple way to approach this is to monitor the paragraph field with jQuery and add a class to the input that changes the color.
lars Skov replied 2 years ago

Thank you for your answer. But how do i do that. I do not have any code experience..

Victor Font replied 2 years ago

You use the jQuery on() function: https://api.jquery.com/on/

You monitor a field by using on('change') the keydown() event, then use addClass to add your custom CSS class to the input element.

If you need help finding a developer to write this code for you, I suggest you visit https://formidable-masterminds.com/developers-directory/

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