I am trying to create a coupon code that would essentially make the registration free but am having a hard time figuring out the code I would use. I keep getting a calculation must be in $#,###.## format:

Here is my example I am using: CouponCode = "partner15" ? -RegistrationFee*1.00 : 0

I'm new to these forms and am kind of lost here, any help would be greatly appreciated.


I am a developer with Cognito Forms.

When a Choice or Yes/No field is added to the form and assigned prices, then in a calculation, the field represents the value selected and we add a secondary property, [FieldName]_Amount, to represent the actual price.

If the first example CouponCode = "partner15" ? -RegistrationFee*1.00 : 0, by referencing [RegistrationFee], you were referencing the selected text value of the field, and trying to perform a calculation against it.

In the second example =CouponCode ="partner15"? -RegistrationFee_Amount*1.00: 0, by referencing [RegistrationFee_Amount], you are referencing the price associated to the selection made in the [RegistrationFee] field.


I played around with it and finally got it to work:

=CouponCode ="partner15"? -RegistrationFee_Amount*1.00: 0
  • Can you explain how that's different from what you tried above. Otherwise, this won't have much utility to others, I'm afraid. – jonsca May 27 '15 at 5:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.