Tell us what you are trying to do?
Trying to add currency field to a number field.
The example I followed worked except Im not sure what to replace in the example short code:
[format-currency num='types-shortcode here' sym='$']
My Post type is lm-event-calendar
and the field is event-cost
Im using Elementor for the layout so Im using a shortcode widget to insert the example shortcode above
Is there any documentation that you are following?
https://toolset.com/forums/topic/display-numeric-value-as-currency/
Is there a similar example that we can see?
What is the link to your site?
Hello and thank you for contacting the Toolset support.
To better assist your, I would like to access your backend area and check this closley. Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **
Please provide more details about your use case and the Toolset elements(template/view/archive) involved?
Hi Waldo,
I did this;
Add this to your custom code in Toolset Settings (Screenshot 1)
function format_money( $atts ) {
extract( shortcode_atts( array(
'price' => '0'), $atts) );
return $price = number_format($price, 2, '.', ',');
}
add_shortcode('format_money', 'format_money');
Use this shortcode for the output within a text editor within Elementor; (Screenshot 2+3)
£[format_money price=[types field='price' output='raw'][/types]][/format_money]
I hope this helps