• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

How to find "join id"?

Dear Sir:
About "Calculating Cost in a repeat group ", there is a code on end of this page :
"var i = this.id.match(/_(\d+)$/)[1];
document.id('join___12___order___total_'+i).value = parseFloat(document.id('join___12___order___qty_'+i).value) * parseFloat(document.id('join___12___order___unit_price_'+i).value);"

Note "Replace '12' with your join id (execute your form and look at the code to find this ID)"
How to "execute your form and look at the code to find this ID".
I don't understand.Could give me a detail instruction to find the join ID?

Many thanks!
 
Thanks troester,
I added JS on both quantiy and price elements ,But the Total element didn't display calculate data,If the Total element need some additional setting?

cal0.JPG
 
Last edited:
In your JS there's a _ missing at the end of all your element names.

Gesendet von meinem SM-G930F mit Tapatalk
 
Inputted:


It display NaN if I set the field as Text;
But it display nothing if I set the field as number:
 
Last edited:
??
Looks like "Part Cost" and "Part Total" etc. are correct.

In your screenshot ew_claim-Part_cost_with_tax is obviously no field element but some sort of dropdown.
 
upload_2020-1-19_10-46-55.png
"ew_claim-Part_cost_with_tax" is field type element.
It doesn't look like...

The code is working on my site. Check with your browser dev tools which JS is running on which elements, if there are JS errors etc.
 
The code is for input fields which have a "value", do the calculation with your original fields not with the calc element.
(This is not Fabrik but just JS).
Why don't you use also a calc element for cost-with-tax?
 
This is a repeat group.Calc element only could calculate one row.How to calculate total price when there is many rows?Such as there are many products in shopping cart.
 
Last edited:
Many Thanks troester,
Your Code works.
"var i = this.getRepeatNum();
document.id('order___total_'+i).value = parseFloat(document.id('order___qty_'+i).value) * parseFloat(document.id('order___unit_price_'+i).value);"
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top