Forums

Do some calculation

chekwan 02 Apr, 2019
Hi,

I want to do some calculation on my form, but I only found a basic calculation at FAQ section.

Can anyone help what formula code for my situation below:

TextField_A (user enter the value)
TextField_B (user enter the value)
TextField_C (user enter the value)
TextField_D (user enter the value)
--------------------------------------------
Total_E = (TextField_C * 0.0001) + TextField_A (auto calculate and read only)
Total_F = (TextField_D * 0.0001) + TextField_B (auto calculate and read only)
healyhatman 02 Apr, 2019
Use JQuery.
jQuery("input[name='Total_E']").val( parseFloat( jQuery("input[name='TextField_A']").val() ) * 0.0001 + parseFloat(jQuery("input[name='TextField_A']").val()));
That should get you started.
VladimirV 04 Apr, 2019
Hi.How to use for calculating the elements of the radios. Could you tell me please, very need.
healyhatman 04 Apr, 2019
1 Likes
Google "semantic UI get value of selected radio"
VladimirV 05 Apr, 2019
That's how I did it. When you change "radius group" (vibor), its value is written to "text field" (total).
$('input:radio[name=vibor]').on('change', function () {
$("#total").val($('input[name=vibor]:checked').val());
});
This topic is locked and no more replies can be posted.