Frequently asked questions


← TO THE LIST OF QUESTIONS

How do I add a digit group separator?

Examples below require knowledge of Javascript and CSS. Tilda Customer Support does not assist in code-related questions.

To add a digit group separator to a calculator form, you need to add a T123 block from the “Other” category, use this:

<script>
function tcalc__changeVal(a, e, t) {
e.html(t.toLocaleString("ru-RU"));
a.find(".t-calc__hiddeninput").val(t)
}
</script>

To add a digit group separator in the products price (for example, in an ST200 block), use this:

<script>
$(document).ready(function() {
$.each($("div.js-product-price"), function() {
var thisClass = $(this).attr("class");
var thisPrice = parseInt($(this).text()).toLocaleString("ru-RU");
$(this).css("display", "none");
$(this).before("<div class='" + thisClass + "'>" + thisPrice + "</div>");
});
});
</script>

ru-RU — to add a space separator;

en-US — to add a comma separator


Was this answer helpful?
No
Yes




Report abuse
If you believe that any website made on Tilda is violating your rights, file a compliant by filling out this form
How to contact our support
To find out more about the platform features, use the feedback form in your Tilda account, or contact us via email team@tilda.cc
Accounting docs
To get the supporting documentation and proof of payment, send your request to docs@tilda.cc
Made on
Tilda