simple php calculation

Hi, i use joomla 3 and rsform component.
At an rsform form i have a total payment field named ABC and i want to get its value, make a calculation and show the result at the XYZ hidden field.

The calculation: ABC / 105 *12

I will put the php code at the default value of the hidden field.

Can you help me with the code? I don’t have much knowledge of coding please help in detail.

Thank you!

form:
[php]

[/php]

[php]

<?php if(isset($_POST['submit'])) { $ABC = $_POST['total_payment']; $result = $ABC / 105*12; echo ''; } ?>

[/php]

This uses jQuery. It’s hard to come up with the right solution from the info you gave in your post.

Sponsor our Newsletter | Privacy Policy | Terms of Service