Notifications
Clear all

Limited Support

Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed. We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.

 

How to format a new field for Topic Custom Fields?

7 Posts
2 Users
0 Reactions
383 Views
Posts: 3
Customer
Topic starter
(@yves-martin)
Member
Joined: 6 months 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

6 Replies
Astghik
Posts: 6444
Admin
(@astgh)
Illustrious Member
Joined: 8 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: 6 months 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: 8 years ago

Illustrious Member
Posts: 6444

@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
Posts: 3
Customer
Topic starter
(@yves-martin)
Member
Joined: 6 months ago

Hi,

Thanks but this is not what Im looking for (and the code do not work here anyway).

How to "format" the numbers? I mean, I would like to show this specific field like a price, "123.45" not "123" only like an integer. A number with 2 decimals. Is it possible?

YM

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

Illustrious Member
Posts: 6444

@yves-martin,

I'll ask the developers and get back to you soon.

Reply
Astghik
Posts: 6444
Admin
(@astgh)
Illustrious Member
Joined: 8 years ago

Hi,

We will add this feature in a future version of the addon.

Reply
Share:
Scroll to top