Hi,
I am trying to create a form that allows users to register for a conference. The user is able to select an admission rate (Regular or Student) and an attendance date (a specific day or the entire conference). A different price should be applied depending on what is selected. Also, if the regular rate is selected, I would like to have price breaks at different quantity ranges.
Here's where I run into problems using the calculation field type for the price field. Any calculation I enter in here results in a JS error on the post the form is displayed on. The form is also hidden on that post page. The markup is all there, but the div containing the form has the attribute style="display:none;". If I remove the calculation, the JS error is gone and the form appears again.
The JS error I am getting is:
expr is undefined expr = expr.replace(matches[i][0], value); gravityforms.js?ver=1.6.4.4.2 (line 838)
I have a dropdown field named Admission with two choices and the Label=>Values are:
Regular=>100 and Student=>55.
In the product field I have tried the following calculations just for testing and they all give the same JS error:
- {Admission:7}
- {Admission:7} * 1
- something simple like 1 + 1
I am using v1.6.4.4.2 on WP v3.3.2.
Am I doing something wrong? Is there a specific syntax for the calculations? Is it possible to put if/switch logic in there? If not, any ideas on how I can accomplish the business logic described above?
Any help would be greatly appreciated.
Thank you for your time.