Skip to main content

I am a developer for Cognito Forms.

The example you included was from this blog post on three ways to implement discounts in Cognito Forms.

The syntax for the discount calculation would be:

=CouponCode = "CODE1" ? 0.15 : CouponCode = "CODE2" ? 0.25 : 0

The syntax is a bit cryptic (used by JavaScript and other C languages), but generally it is:

[condition] ? [true result] : [false result]

But you can chain them together indefinitely like:

[condition 1] ? [true result 1] : [condition 2] ? [true result 2] : [condition 3] ? [true result 3] : [false result]

The full documentation for calculations can be found on the Cognito Forms help siteCognito Forms help site.

I am a developer for Cognito Forms.

The example you included was from this blog post on three ways to implement discounts in Cognito Forms.

The syntax for the discount calculation would be:

=CouponCode = "CODE1" ? 0.15 : CouponCode = "CODE2" ? 0.25 : 0

The syntax is a bit cryptic (used by JavaScript and other C languages), but generally it is:

[condition] ? [true result] : [false result]

But you can chain them together indefinitely like:

[condition 1] ? [true result 1] : [condition 2] ? [true result 2] : [condition 3] ? [true result 3] : [false result]

The full documentation for calculations can be found on the Cognito Forms help site.

I am a developer for Cognito Forms.

The example you included was from this blog post on three ways to implement discounts in Cognito Forms.

The syntax for the discount calculation would be:

=CouponCode = "CODE1" ? 0.15 : CouponCode = "CODE2" ? 0.25 : 0

The syntax is a bit cryptic (used by JavaScript and other C languages), but generally it is:

[condition] ? [true result] : [false result]

But you can chain them together indefinitely like:

[condition 1] ? [true result 1] : [condition 2] ? [true result 2] : [condition 3] ? [true result 3] : [false result]

The full documentation for calculations can be found on the Cognito Forms help site.

added 12 characters in body
Source Link
Alex
  • 22.8k
  • 12
  • 83
  • 104

I am a developer for Cognito Forms.

The example you included was from this blog post on three ways to implement discounts in Cognito Forms.

The syntax for the discount calculation would be:

=CouponCode = "CODE1" ? 0.15 : CouponCode = "CODE2" ? 0.25 : 0

=CouponCode = "CODE1" ? 0.15 : CouponCode = "CODE2" ? 0.25 : 0

The syntax is a bit cryptic (used by JavaScript and other C languages), but generally it is:

[condition] ? [true result] : [false result]

[condition] ? [true result] : [false result]

butBut you can chain them together indefinitely like:

[condition 1] ? [true result 1] : [condition 2] ? [true result 2] : [condition 3] ? [true result 3] : [false result]

[condition 1] ? [true result 1] : [condition 2] ? [true result 2] : [condition 3] ? [true result 3] : [false result]

The full documentation for calculations can be found on the Cognito Forms help site.

I am a developer for Cognito Forms.

The example you included was from this blog post on three ways to implement discounts in Cognito Forms.

The syntax for the discount calculation would be:

=CouponCode = "CODE1" ? 0.15 : CouponCode = "CODE2" ? 0.25 : 0

The syntax is a bit cryptic (used by JavaScript and other C languages), but generally it is:

[condition] ? [true result] : [false result]

but you can chain them together indefinitely like:

[condition 1] ? [true result 1] : [condition 2] ? [true result 2] : [condition 3] ? [true result 3] : [false result]

The full documentation for calculations can be found on the Cognito Forms help site.

I am a developer for Cognito Forms.

The example you included was from this blog post on three ways to implement discounts in Cognito Forms.

The syntax for the discount calculation would be:

=CouponCode = "CODE1" ? 0.15 : CouponCode = "CODE2" ? 0.25 : 0

The syntax is a bit cryptic (used by JavaScript and other C languages), but generally it is:

[condition] ? [true result] : [false result]

But you can chain them together indefinitely like:

[condition 1] ? [true result 1] : [condition 2] ? [true result 2] : [condition 3] ? [true result 3] : [false result]

The full documentation for calculations can be found on the Cognito Forms help site.

Adding a link to the help documentation.
Source Link
Jamie Thomas
  • 3k
  • 1
  • 13
  • 19

I am a developer for Cognito Forms.

The example you included was from this blog post on three ways to implement discounts in Cognito Forms.

The syntax for the discount calculation would be:

=CouponCode = "CODE1" ? 0.15 : CouponCode = "CODE2" ? 0.25 : 0

The syntax is a bit cryptic (used by JavaScript and other C languages), but generally it is:

[condition] ? [true result] : [false result]

but you can chain them together indefinitely like:

[condition 1] ? [true result 1] : [condition 2] ? [true result 2] : [condition 3] ? [true result 3] : [false result]

The full documentation for calculations can be found on the Cognito Forms help site.

I am a developer for Cognito Forms.

The example you included was from this blog post on three ways to implement discounts in Cognito Forms.

The syntax for the discount calculation would be:

=CouponCode = "CODE1" ? 0.15 : CouponCode = "CODE2" ? 0.25 : 0

The syntax is a bit cryptic (used by JavaScript and other C languages), but generally it is:

[condition] ? [true result] : [false result]

but you can chain them together indefinitely like:

[condition 1] ? [true result 1] : [condition 2] ? [true result 2] : [condition 3] ? [true result 3] : [false result]

I am a developer for Cognito Forms.

The example you included was from this blog post on three ways to implement discounts in Cognito Forms.

The syntax for the discount calculation would be:

=CouponCode = "CODE1" ? 0.15 : CouponCode = "CODE2" ? 0.25 : 0

The syntax is a bit cryptic (used by JavaScript and other C languages), but generally it is:

[condition] ? [true result] : [false result]

but you can chain them together indefinitely like:

[condition 1] ? [true result 1] : [condition 2] ? [true result 2] : [condition 3] ? [true result 3] : [false result]

The full documentation for calculations can be found on the Cognito Forms help site.

Source Link
Jamie Thomas
  • 3k
  • 1
  • 13
  • 19
Loading