# Adding Conditional Logic to form Confirmation Message \[RESOLVED\]

**URL:** <https://community.gravityforms.com/t/adding-conditional-logic-to-form-confirmation-message-resolved/15572>\
**Category:** Get Help\
**Tags:** conditional-shortcode, notifications, disable-default-formatting, notifications-content\
**Created:** [July 21, 2023, 1:19am UTC](https://community.gravityforms.com/t/adding-conditional-logic-to-form-confirmation-message-resolved/15572 "2023-07-21T01:19:18Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jerryandtabatha](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@Jerryandtabatha](https://community.gravityforms.com/u/Jerryandtabatha)\
**Post date:** [July 21, 2023, 1:19am UTC](https://community.gravityforms.com/t/adding-conditional-logic-to-form-confirmation-message-resolved/15572/1 "2023-07-21T01:19:18Z")

</div>

Hello. I have a form that has a Checkbox section on it with 5 choices.  
The site visitor can select more than once choice at a time.  
How can I set the conditional logic for the confirmation form to display a link pertaining to each of the choices selected? For example: If I choose, Option 1, Option 3, and Option 4, I want to be given the download link for each one I selected after I hit “Submit”. How can I achieve this?

Kind regards,  
Tabatha

---

<div class="post-metadata">

**Author:** ![Jake\_Jackson](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/jake_jackson/32/14685_2.png) [@Jake\_Jackson](https://community.gravityforms.com/u/Jake_Jackson)\
**Post date:** [July 21, 2023, 5:10am UTC](https://community.gravityforms.com/t/adding-conditional-logic-to-form-confirmation-message-resolved/15572/2 "2023-07-21T05:10:02Z")

</div>

Hi @Jerryandtabatha,

Welcome to the forums! [Gravity Forms Conditional Shortcode](https://docs.gravityforms.com/conditional-shortcode/) is what you’re looking for. There’s [an example in the docs for how to apply this to a Checkbox field](https://docs.gravityforms.com/conditional-shortcode/#show-content-if-a-certain-checkbox-was-checked). Change the field ID in the example to match your Checkbox field, adjust the value from `10` to the specific option you want, then include your download link in the middle.

Note: it’ll probably take a bit of trial and error to get it working just right.

Good luck!

---

<div class="post-metadata">

**Author:** ![Jerryandtabatha](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@Jerryandtabatha](https://community.gravityforms.com/u/Jerryandtabatha)\
**Post date:** [July 21, 2023, 3:07pm UTC](https://community.gravityforms.com/t/adding-conditional-logic-to-form-confirmation-message-resolved/15572/3 "2023-07-21T15:07:47Z")

</div>

Thank you! I will be testing this out today and report back.

---

<div class="post-metadata">

**Author:** ![Jerryandtabatha](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@Jerryandtabatha](https://community.gravityforms.com/u/Jerryandtabatha)\
**Post date:** [July 21, 2023, 4:09pm UTC](https://community.gravityforms.com/t/adding-conditional-logic-to-form-confirmation-message-resolved/15572/4 "2023-07-21T16:09:17Z")

</div>

I just tried the code:

[gravityforms action=“conditional” merge\_tag=“{Checkboxes:Green Quadrant:value}” condition=“contains” value=“1”]  
My download link here  
[/gravityforms]

After adding this code, and testing the form , once I hit Submit, no text appears at all on the confirmation message.

Does the code look right to you? I am not sure how to find the “Value” of each option in the checkbox.

---

<div class="post-metadata">

**Author:** ![Jerryandtabatha](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@Jerryandtabatha](https://community.gravityforms.com/u/Jerryandtabatha)\
**Post date:** [July 21, 2023, 8:23pm UTC](https://community.gravityforms.com/t/adding-conditional-logic-to-form-confirmation-message-resolved/15572/5 "2023-07-21T20:23:51Z")

</div>

Update: I FIGURED IT OUT!

This is the code I used on the confirmation message:

**Thank you for your submission! Here are you download links:**

[gravityforms action=“conditional” merge\_tag=“{Checkboxes:9:value}” condition=“contains” value=“1”]  
my download link here  
[/gravityforms]

[gravityforms action=“conditional” merge\_tag=“{Checkboxes:9:value}” condition=“contains” value=“2”]  
my download link here  
[/gravityforms]

[gravityforms action=“conditional” merge\_tag=“{Checkboxes:9:value}” condition=“contains” value=“3”]  
my download link here  
[/gravityforms]

For each section of the code that has: {Checkboxes:9:value}  
The “9” is the number of the form ID :  
(you find this ID number in the form settings\>Click the title of the checkbox\>on the right side of the window you will see the ID number.

And where it says: “contains” value=“1”]  
I set each checkbox value and change this number to match the choice value:  
Click on form settings\>click checkbox area\>on the right side of the window, click on Edit Choices and you will see a tick box for “Show Values”. I set this as 1, 2,3 etc. Save form.

And lastly, this is how my confirmation settings look:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/2X/2/27930c70ce70a3ddb79b1e36a2d0fd0ef586ad38.png)

---

<div class="post-metadata">

**Author:** ![Jerryandtabatha](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@Jerryandtabatha](https://community.gravityforms.com/u/Jerryandtabatha)\
**Post date:** [July 21, 2023, 10:12pm UTC](https://community.gravityforms.com/t/adding-conditional-logic-to-form-confirmation-message-resolved/15572/6 "2023-07-21T22:12:02Z")

</div>

The above method is working well, however, I am noticing that there are gaps in the spacing where an unchecked item is. For instance, when selecting options 1, 2, 4, & 5 , the confirmation appears like this for example:

Thank you for your response! Here are your download links:

Option 1  
Option 2

Option 4  
Option 5

See how it “skips” over the unchecked item leaving a gap? How can I fix this?

---

<div class="post-metadata">

**Author:** ![chrishajer](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/chrishajer/32/88_2.png) [@chrishajer](https://community.gravityforms.com/u/chrishajer)\
**Post date:** [July 21, 2023, 11:09pm UTC](https://community.gravityforms.com/t/adding-conditional-logic-to-form-confirmation-message-resolved/15572/7 "2023-07-21T23:09:11Z")

</div>

See the reply I just added here:

> [@Exclude Notification Field if they a not used](https://community.gravityforms.com/t/exclude-notification-field-if-they-a-not-used/15564/4):
>
> You can check the box “Disable auto-formatting” and the line breaks will not be converted to HTML br and p tags. Then you have to add all your own HTML markup, because WordPress won’t do any of it. You may have to experiment a bit to ensure you have the line breaks where you want them still.

---

<div class="post-metadata">

**Author:** ![Jerryandtabatha](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@Jerryandtabatha](https://community.gravityforms.com/u/Jerryandtabatha)\
**Post date:** [July 21, 2023, 11:50pm UTC](https://community.gravityforms.com/t/adding-conditional-logic-to-form-confirmation-message-resolved/15572/8 "2023-07-21T23:50:09Z")

</div>

Thank you! I got it all sorted out, and now it’s executing beautifully!  
Thank you so much for your help!

---

<div class="post-metadata">

**Author:** ![chrishajer](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/chrishajer/32/88_2.png) [@chrishajer](https://community.gravityforms.com/u/chrishajer)\
**Post date:** [July 24, 2023, 4:12pm UTC](https://community.gravityforms.com/t/adding-conditional-logic-to-form-confirmation-message-resolved/15572/9 "2023-07-24T16:12:33Z")

</div>


