Notifications
Clear all

How to format a new field for Topic Custom Fields?

5 Posts
2 Users
0 Reactions
34 Views
Posts: 3
Customer
Topic starter
(@yves-martin)
Member
Joined: 2 weeks ago

Hi,

Is it possible to format a field for a price, using the Topic Custom Fields add-on?

I would like to set the field like "99.00$" if someone enter "99". Actually, the field just show "99"

Is there a documentation for that ?

Regards,

Yves

4 Replies
Astghik
Posts: 6303
Admin
(@astgh)
Illustrious Member
Joined: 7 years ago

Hi,

Could you please provide the URL where we can see the example? In this case, I might be able to provide a CSS or JS solution for you.

Reply
Posts: 3
Customer
Topic starter
(@yves-martin)
Member
Joined: 2 weeks ago

Hi,

This is an example : https://ve2ymm.com/community/forum-principal/hotspot-mmdvm-radioamateur-pre-programme-dmr

The number is used for a price, and I would like to format it like 123.45 (don't need the sign "$"), this will be more standard. How to set a format for a number ?

PS: see :

image

 Regards,

YM

Reply
1 Reply
Astghik
Admin
(@astgh)
Joined: 7 years ago

Illustrious Member
Posts: 6303

@yves-martin 

Add this CSS code code: 

#wpforo #wpforo-wrap .wpf-topic-fields .wpf-topic-field-value:after{content:"$"}

Insert the code in the "Custom CSS Code" textarea. For more info visit: https://wpforo.com/docs/wpforo-v2/settings/colors-styles/#custom-css-code

However, if you add a new field this code won't work correctly. You should let us know, we'll provide a new code for you. 

Reply
Share:
Scroll to top