• New Commercial Services Section

    We have now opened a commercial services section here on the forum. If you have a Fabrik project that you wish to have someone work on for you, post it under Help Wanted. If you are an application developer and wish to earn some money helping others, post your details under Fabrik Application Developers.

    Both of these are unmoderated. It will be up to both parties to work out the details and come to an agreement.

What i am doing wrong in the decimal / currency type element (POSIBLE BUG)

jmoises

Active Member
i just cant figure it out, i try many settings in the field element and cant see to show the coma ","
upload_2021-10-19_13-26-24.png

here are my settings
upload_2021-10-19_13-27-42.png

Thanks for any help!
 
I don't think you can achieve all you want (also referring to your other post here) with the field element out of the box. It's not a "currency element", after all...

A workaround could be to use that field element in the form, but in the list to display a (new) calc element where you can format the field element's value as you like. It only requires to not display the field element in the list, and to not show the calc element in the form.
 
It works for me in the list view with the same settings, so the output is $2,300.00

Do you have your screenshot from details view? In details view (when element is read-only) it seems that thousand separator and decimal point are not considered at all, regardless whether you have something in "Format string" field or not.

To format the number in details view you could use some jQuery in details_xx.js and in "document ready" function loop through all the "number" fields with "each" function and format them as you like. As this is pure jQuery, you will find lots of examples for that in Stackoverflow.
 
It works for me in the list view with the same settings, so the output is $2,300.00

Do you have your screenshot from details view? In details view (when element is read-only) it seems that thousand separator and decimal point are not considered at all, regardless whether you have something in "Format string" field or not.

To format the number in details view you could use some jQuery in details_xx.js and in "document ready" function loop through all the "number" fields with "each" function and format them as you like. As this is pure jQuery, you will find lots of examples for that in Stackoverflow.

thanks for reply, in the list show ok.

upload_2021-10-20_10-11-14.png

in edit form looks ok with the coma
upload_2021-10-20_10-12-21.png

in detail view no comas

upload_2021-10-20_10-13-6.png

my first post is a READ ONLY repeat group in a form but is working like the detail

upload_2021-10-20_10-14-56.png

i belive it should show the comma right?
 
ooo if i remove the read only from the repeat group i get the commas

upload_2021-10-20_10-19-27.png

but i need to be read only is this a bug?

and yes is something i can fix with some jquery, but the settings on the element show be same on readonly or not correct?
 
I guess you could call it a bug. I cannot see any solution except the one I wrote above without hacking the core code.
 
Last edited:
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top