Is there a way to add a symbol before and/or after a multiple text entry? | XM Community
Skip to main content

I have a text entry with 6 form fields. I would like to add a $ before 2 of them and a % after 1 of them. Is this possible? I found a Java code in the community to add a % sign and it worked but it added it to each form field. I need to be able to leave some fields blank and be able to add $ and %. Any help would greatly be appreciated....Thanks in advance.

Capture.PNG

Hi,
You can use the below code to add symbol after the text entry and by doing slight modification you can place the symbol after required text entry.

jQuery('input[type="text"]').eq(1).after(" $"); //this will place $ after 2nd text entry box
jQuery('input[type="text"]').eq(2).after(" %") //this will place % after 3rd text entry box


Thank you so much! It worked like a charm.


Leave a Reply