Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
Hi everyone,
I really need your help here.. I want to calculate the total amount should be paid when user choose product1 and product2. For example, user choose 1 product1 which cost $1 and 1 product2 cost $2, so the total amount paid is $3. How should i do that using custom HTML? My code on this javascript is so bad since i am still new with java.
Really hope someone could guide me here.
Thanks
6 Comments
Hugo
Hi Fasha,
Please see Calculation Field.
Thanks.
Fasha
Hi Hugo,
Thanks for your reply, but right now i am still using community edition of Joget V3, so there is no calculation field like in the Enterprise edition. I hope i could upgrade my Joget edition in the future. But for the time being, is there any alternative way i can do it using custom HTML?
Really appreciate your kind reply.
Thanks
Walter
Try this
Replace #amount1, #amount2 and #total with the fields that you have.
More reading at http://stackoverflow.com/questions/6552959/sum-of-two-input-value-by-jquery
Fasha
Hi Walter,
I try the coding above and the reference link you give, but i still cannot display the value in text field Total Amount Pay. Do i make a mistake on the code? I really appreciate your comment, and for your info i am still a beginner in Javascript. Then the code below:
I am not really understand the used of this code. Is there anything i should add at the code?
Thanks
Thanks
Fasha
Hi everyone,
I know this is a very straightforward calculation. But yet since it is in Java, it does give me some trouble how to do the syntax. in my logic, it should be just like below code:
but it shows in the total paid value is Nan. And i am not sure why. maybe my syntax is not correct. hope anyone can guide me on this.
Thanks
Hugo
Hi Fasha,
May I suggest that you learn up on Javascript first? The code that you have there is actually Javascript and not Java.
Cheers.