Syntax issue grabbing form input value

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.

 <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

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

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

Thanks,

Terry

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

 {% 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 %}

Thank you for sharing your solution, Terry! — Jaycee