# HTML message if Country selected in field 1 = Country selected in field 2

**URL:** <https://community.gravityforms.com/t/html-message-if-country-selected-in-field-1-country-selected-in-field-2/17234>\
**Category:** Get Help\
**Tags:** custom, gravity-wiz, conditional-logic\
**Created:** [April 10, 2024, 9:31am UTC](https://community.gravityforms.com/t/html-message-if-country-selected-in-field-1-country-selected-in-field-2/17234 "2024-04-10T09:31:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guillaumeg06](https://avatars.discourse-cdn.com/v4/letter/g/df788c/32.png) [@Guillaumeg06](https://community.gravityforms.com/u/Guillaumeg06)\
**Post date:** [April 10, 2024, 9:31am UTC](https://community.gravityforms.com/t/html-message-if-country-selected-in-field-1-country-selected-in-field-2/17234/1 "2024-04-10T09:31:28Z")

</div>

Hello there,

I am looking for a simple solution for this case.  
I would like to have an HTML field for a message if the user select the same country in my list field 1 and my list field 2

is it possible without coding?

Thanks for your help!

---

<div class="post-metadata">

**Author:** ![samuel](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/samuel/32/2539_2.png) [@samuel](https://community.gravityforms.com/u/samuel)\
**Post date:** [April 10, 2024, 12:33pm UTC](https://community.gravityforms.com/t/html-message-if-country-selected-in-field-1-country-selected-in-field-2/17234/2 "2024-04-10T12:33:39Z")

</div>

Hi,

Here’s a [snippet](https://github.com/gravitywiz/snippet-library/blob/master/gravity-forms/gw-field-to-field-conditional-logic.php) to add support for field to field conditional logic in Gravity Forms, which may work for you. So for example, if the ID of the second field is 10, you would set up the conditional logic like so;

![2024-04-10_12-31-02](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/2X/b/b4ee54f1337ed9f490977f06513492b521d68e0d.jpeg)

I hope this helps.

Best,

---

<div class="post-metadata">

**Author:** ![Guillaumeg06](https://avatars.discourse-cdn.com/v4/letter/g/df788c/32.png) [@Guillaumeg06](https://community.gravityforms.com/u/Guillaumeg06)\
**Post date:** [April 10, 2024, 3:00pm UTC](https://community.gravityforms.com/t/html-message-if-country-selected-in-field-1-country-selected-in-field-2/17234/3 "2024-04-10T15:00:06Z")

</div>

thank you Samuel!

Just to understand, I have to copy past the snippet code in my gw-field-to-field-conditional-logic.php to be enable to set the logical condition {:10} instead of the pre filled replies ?

Best

---

<div class="post-metadata">

**Author:** ![samuel](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/samuel/32/2539_2.png) [@samuel](https://community.gravityforms.com/u/samuel)\
**Post date:** [April 10, 2024, 6:02pm UTC](https://community.gravityforms.com/t/html-message-if-country-selected-in-field-1-country-selected-in-field-2/17234/4 "2024-04-10T18:02:00Z")

</div>

Hi,

I don’t really understand the question you’re asking, but you have to add the [snippet](https://github.com/gravitywiz/snippet-library/blob/master/gravity-forms/gw-field-to-field-conditional-logic.php) on the GitHub page to enable field to field conditional logic. [Here’s an article](https://gravitywiz.com/documentation/how-do-i-install-a-snippet/) on how to add a snippet to your website.

Best.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/2X/f/fef63f0599c45e0218c30d9f5d7ca8bff9b00189.png) [@system](https://community.gravityforms.com/u/system)\
**Post date:** [May 10, 2024, 6:02pm UTC](https://community.gravityforms.com/t/html-message-if-country-selected-in-field-1-country-selected-in-field-2/17234/5 "2024-05-10T18:02:05Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
