Home » jQuery9 March 2015

jQuery: Calculate total price amount on Multiple Checkbox & Radio button selection


I have different checkboxes and radio buttons. The checkboxes and radio buttons have some price value associated with them. Upon checking them I have to calculate the total price and display it in a textbox.


We’ll use jQuery for this scenario.

Here’s an example HTML to create checkbox and radio buttons. Checkboxes are made to be multiple selected. Radio buttons are made to be single selected.

Here’s jQuery code to calculate and show total amount based on the selection. “my-activity” is the class name given to the checkboxes and radio buttons.


Form action in the above demo is test.php. I have just printed the post data in it.
Here is the code present in test.php:


Hope this helps. Thanks.


Get New Post by Email

Find me on

FacebookTwitterGoogle+LinkedInRSS Feed

Comments are closed.