CiviCRM Forums
News: You can learn more about CiviCRM from our new free book: Understanding CiviCRM. Also Check the CiviCRM Blog for updated information on CiviCRM
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 02, 2010, 09:05:54 am


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: jQuery and Price Recalculation in CiviEvent Form  (Read 200 times)
qjensen
I post occasionally
**

Karma: 2
Offline Offline

CiviCRM: 3.14
CMS: Drupal 6.16
MySQL: 5
PHP: 5

Posts: 48


View Profile
« on: March 19, 2010, 02: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
Logged
qjensen
I post occasionally
**

Karma: 2
Offline Offline

CiviCRM: 3.14
CMS: Drupal 6.16
MySQL: 5
PHP: 5

Posts: 48


View Profile
« Reply #1 on: March 20, 2010, 05: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.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM