# If Statement - Form Selection - HubL

**URL:** <https://community.hubspot.com/t/if-statement-form-selection-hubl/16440>\
**Category:** CMS Development\
**Tags:** hubdb\
**Created:** [September 26, 2019, 1:57pm UTC](https://community.hubspot.com/t/if-statement-form-selection-hubl/16440 "2019-09-26T13:57:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pm8rsh88](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/pm8rsh88/32/78471_2.png) [@pm8rsh88](https://community.hubspot.com/u/pm8rsh88)\
**Post date:** [September 26, 2019, 1:57pm UTC](https://community.hubspot.com/t/if-statement-form-selection-hubl/16440/1 "2019-09-26T13:57:06Z")

</div>

I was wondering if you could assist.

I have 2 forms, a HubDB and a dynamically generating page. I have a column in HubDB (multi-select) set up so I can select which form I want to appear on the page (default/form2). I want the dynamic page to pull in whichever form I choose. I have 2 custom modules, each with a different form in set up.

I thought an IF statement might work, but it doesn’t. To me, the theory behind the code should work, but it doesn’t.

{% if dynamic\_page\_hubdb\_row.form\_selection.name == ‘default’ %}

{% module “module\_156528039003630” path=“/\_2019/Homepage-May-2019/modules/LP-Form-Section-May-2019 copy”, label=“Vacancy-Form1-August-2019”, no\_wrapper=True %}

{% else %}

{% module “module\_156536372007990” path=“/\_2019/Homepage-May-2019/modules/Vacancy-Form1-August-2019 copy”, label=“Vacancy-Form2-August-2019”, no\_wrapper=True %}

{% endif %}

I have used {{ dynamic\_page\_hubdb\_row.form\_selection|pprint }} to find out if I need to use Name, ID or Value to define the operator, but neither of them works. Am I missing something really obvious?

Only the else portion of the IF statement ever shows. I can’t get the name == ‘default’ section to work

---

<div class="post-metadata">

**Author:** ![pm8rsh88](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/pm8rsh88/32/78471_2.png) [@pm8rsh88](https://community.hubspot.com/u/pm8rsh88)\
**Post date:** [September 27, 2019, 10:58am UTC](https://community.hubspot.com/t/if-statement-form-selection-hubl/16440/2 "2019-09-27T10:58:51Z")

</div>

I managed to solve this by switching how I approached what I needed it to do.

I changed the multiselector to a checkbox and used that to switch out the modules.

{% if dynamic\_page\_hubdb\_row.form\_cover\_letter == ‘0’ %}
