I'm trying to list out dynamic recipients based on channel entries. However, no matter which option I choose, it only sends to the first email listed. Am I missing something?

The only example I could find was from https://solspace.com/expressionengine/freeform/docs/form/#manual-example. However that's rendering from a tag in the backend and I'm creating on the fly.

  <select name="{field:department:handle}" type="dynamic_recipients">
            {field:department:options}
                <option value="{option:index}" {if option:checked}selected{/if}>
                    {option:label}
                </option>
            {/field:department:options}

Below is my form template, the embed I'm using to generate the list pipe delimited emails, and the rendered HTML.

=====My Form template:=====

{exp:freeform_next:form
                        form="contact_form"
                        return_url="/contact/thanks"
                        dynamic_notification_recipients="andy+imic@duboseweb.com|{embed='embeds/contact_emails_list'}"
                        dynamic_notification_template="contact_us"
                    }
                        <input class="position" type="text" name="full_name" placeholder="name"><!--Form Starts-->
                        <input type="text" placeholder="email" name="email">
                        <select name="department" type="dynamic_recipients">

                            <option value="0">Corporate Office</option>
                            {exp:channel:entries channel="properties" dynamic="no"}
                            <option value="{absolute_count}">{property_city} | {title}</option>
                            {/exp:channel:entries}
                        </select>

                        <textarea rows="6" placeholder="message" name="message"></textarea>
                        <a src="#" class="center"><button class="main"><span><span><span>SUBMIT</span></span></span></button></a>
                    {/exp:freeform_next:form}

=========================================================================

======== embeds/contact_emails_list.html ]=========================

{exp:channel:entries channel="properties" dynamic="no"}andy+imic{count}@duboseweb.com{if count != total_results}|{/if}{/exp:channel:entries}

=========================================================================

=============== RENDERED HTML========================

<form method="POST">
<a id="27c5e3-form-8oWe9jZpP_0dc8_9fb2bdb42810dfebac608aad41a356b4356c8a295b995513a411d"></a><input type="hidden" name="formReturnUrl" value="/contact/thanks"><input type="hidden" name="csrf_token" value="6bb1f1ad129c7184e1263b7373e45092d1a04454"><input type="hidden" name="formHash" value="8oWe9jZpP_0dc8_9fb2bdb42810dfebac608aad41a356b4356c8a295b995513a411d"><div style="position: absolute !important; width: 0 !important; height: 0 !important; overflow: hidden !important;" aria-hidden="true"><label for="freeform_form_handle_18772b">Leave this field blank</label><input type="text" value="9cb84a" id="freeform_form_handle_18772b" name="freeform_form_handle_18772b"></div>
                        <input class="position" type="text" name="full_name" placeholder="name" ><!--Form Starts-->
                        <input type="text" placeholder="email" name="email">
                        <select name="department" type="dynamic_recipients">

                            <option value="0">Corporate Office</option>

                            <option value="1">Mount Pleasant | TownePlace Suites</option>

                            <option value="2">Irmo | Stow-Away Storage</option>

                            <option value="3">Chapin | Lighthouse Marina</option>

                            <option value="4">Pawleys Island | Hampton Inn</option>

                            <option value="5">Myrtle Beach | Comfort Suites</option>

                            <option value="6">Mount Pleasant | Wyndham Garden</option>

                            <option value="7">Morganton | Hampton Inn</option>

                            <option value="8">Lexington | Wingate by Wyndham</option>

                            <option value="9">Kingsport | Hampton Inn</option>

                            <option value="10">Georgetown | Quality Inn &amp; Suites</option>

                            <option value="11">Georgetown | Hampton Inn</option>

                            <option value="12">Columbia | Wyndham Garden</option>

                            <option value="13">Charleston | Wingate by Wyndham</option>

                            <option value="14">Bristol | Fairfield Inn &amp; Suites</option>

                            <option value="15">Bristol | Hampton Inn</option>

                            <option value="16">Fernandina Beach | Hampton Inn</option>

                        </select>

                        <textarea rows="6" placeholder="message" name="message"></textarea>
                        <a src="#" class="center"><button class="main"><span><span><span>SUBMIT</span></span></span></button></a>
                    </form>

==================================================================

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.