# Syntax issue grabbing form input value

**URL:** <https://community.hubspot.com/t/syntax-issue-grabbing-form-input-value/59650>\
**Category:** CMS Development\
**Created:** [June 23, 2022, 2:00pm UTC](https://community.hubspot.com/t/syntax-issue-grabbing-form-input-value/59650 "2022-06-23T14:00:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tmcmillan99](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tmcmillan99/32/93181_2.png) [@tmcmillan99](https://community.hubspot.com/u/tmcmillan99)\
**Post date:** [June 23, 2022, 2:00pm UTC](https://community.hubspot.com/t/syntax-issue-grabbing-form-input-value/59650/1 "2022-06-23T14:00:14Z")

</div>

Can someone tell me what I am doing wrong with the syntax below? I am trying to grab the value (email) from the input to use as a variable to pass as a url parameter.

```lia-code-sample
 <div class="flex flex-col">
 <form id="form-member" method="GET">
 <label>Enter Member's Email:</label>
 <input name="member" type="text" class="col-span-2 p-4" />
 </form>
 {% set query = request.query_dict.get("member") %}
 {% set members = crm_objects("azimuth", "member_email=" + query, "sfcontact_id") %}
 </div>
 <div class="w-full mt-10">
 <a class="view-btn text-white uppercase" href="/dashboard?member_email={{ query }}&sf_id={{ member.sfcontact_id }}" target="_blank">View Dashboard</a>
 </div>

```

Thanks,

Terry McMillan

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [June 23, 2022, 5:29pm UTC](https://community.hubspot.com/t/syntax-issue-grabbing-form-input-value/59650/2 "2022-06-23T17:29:05Z")

</div>

Hi, @tmcmillan99! Thanks for the interesting question. Hey @mangelet @JBeatty @albertsg, can you provide any insight into how @tmcmillan99 can accomplish their goal?

Thank you!

Jaycee

---

<div class="post-metadata">

**Author:** ![tmcmillan99](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tmcmillan99/32/93181_2.png) [@tmcmillan99](https://community.hubspot.com/u/tmcmillan99)\
**Post date:** [June 30, 2022, 3:52pm UTC](https://community.hubspot.com/t/syntax-issue-grabbing-form-input-value/59650/3 "2022-06-30T15:52:44Z")

</div>

I still haven’t been able to figure out the correct syntax for this issue. Any help would be greatly appreciated.

Thanks,

Terry

---

<div class="post-metadata">

**Author:** ![tmcmillan99](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tmcmillan99/32/93181_2.png) [@tmcmillan99](https://community.hubspot.com/u/tmcmillan99)\
**Post date:** [July 19, 2022, 1:53pm UTC](https://community.hubspot.com/t/syntax-issue-grabbing-form-input-value/59650/4 "2022-07-19T13:53:19Z")

</div>

I was able to figure out the correct syntax. Posting the working code for reference…

```lia-code-sample
 {% set queryparam = "" %}
 {% if request.query_dict.member != "" %}
 {% set queryparam = queryparam~"member_email="~request.query_dict.member|urldecode %}
 {% endif %}
 {% set members = crm_objects("azimuth", queryparam, "sfcontact_id") %}
 {% if request.query == "" %}
 <div class="w-full mt-10 hidden">
 </div>
 {% elif members.results == [] %}
 <div class="w-full mt-10 no-member">
 <h4>
 No member was found.
 </h4>
 </div>
 {% else %}
 {% for member in members.results %}
 {% if loop.first %}
 <div class="w-full mt-10">
 <a class="view-btn text-white uppercase" href="/dashboard?{{ queryparam }}&sf_id={{ member.sfcontact_id }}" target="_blank">View Dashboard</a>
 </div>
 {% endif %}
 {% endfor %}
 {% endif %}

```

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [July 21, 2022, 5:31pm UTC](https://community.hubspot.com/t/syntax-issue-grabbing-form-input-value/59650/5 "2022-07-21T17:31:57Z")

</div>

Thank you for sharing your solution, Terry! — Jaycee
