CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • jQuery and Price Recalculation in CiviEvent Form
Pages: [1]

Author Topic: jQuery and Price Recalculation in CiviEvent Form  (Read 895 times)

qjensen

  • I post frequently
  • ***
  • Posts: 141
  • Karma: 11
    • Scaled Solutions
  • CiviCRM version: 4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
jQuery and Price Recalculation in CiviEvent Form
March 19, 2010, 03:56:54 am
Hello Folks,

I have a CiviEvent reg form that my client wants me to customize by making a set of three price fields in the price set mutually exclusive. I have the javascript working that resets the values for the other two price fields when one of them changes. The problem that I am having is that the price is not being recalculated when my code changes the selected value of the radio buttons. Is there a way I can trigger the recalculation when changing the value of the price field using jQuery?

Thanks for your help,
Quint
Quint Jensen
Web Developer
Scaled Solutions
--" Remove the 'I want you to like me' notes from your forehead and place them where they truly will do the most good -- on your mirror!" Author Unknown

qjensen

  • I post frequently
  • ***
  • Posts: 141
  • Karma: 11
    • Scaled Solutions
  • CiviCRM version: 4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Re: jQuery and Price Recalculation in CiviEvent Form-Fixed
March 20, 2010, 06:49:30 pm
I ended up just copying most of the js that handles recalculation from templates/CRM/Price/Form/Calculate.tpl. It needed a little tweaking but it it got the job done.
Quint Jensen
Web Developer
Scaled Solutions
--" Remove the 'I want you to like me' notes from your forehead and place them where they truly will do the most good -- on your mirror!" Author Unknown

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • jQuery and Price Recalculation in CiviEvent Form

This forum was archived on 2017-11-26.