I want an automatic calculations when I input value to fieldvalue1 of fieldnameA and the value is multiply by 4 which will auto appear on fieldvalue2 of fieldnameB And finally the input in A and the results in B can be submitted with any other form field.
Note: am using multi field for A and B.
please how can I go about doing this.
Hi Afroset,
That sounds like a case for Custom JavaScript.
Bob
So, how can I go about it.
<script type="text/javascript">
window.addEvent('domready', function() {
jQuery('Amount_in_Dollar').addEvent('change', function() {
jQuery('Amount_in_naira') = jQuery('Amount_in_Dollar').value*10;
});
});
</script>
jQuery('field identifier').val() to get the value
jQuery('field identifier').val(some value) to set the value
Did you mean this
<script type="text/javascript">window.addEvent('domready', function() { jQuery('Field ID1').val() { jQuery('Field ID2') = jQuery('Field ID1').val(*10); });});</script>for better understanding @healyhatman and @ GreyHead can you please rewrite the code fully for me. with instructions on how to go about it on CF v5 . I'll be so greatful