1

I have the following:

{exp:email:contact_form
    charset="utf-8"
    form_class="customer-email-form"
    recipients={exp:stash:get name='recipients'}
}

Notice that the recipients parameter's value is not in quotes. When I put quotes and try to send an email, I get "no recipients" error. However, if I replace the Stash with hard coded email address(es), I need the quotes to make the email form work.

Is there something wrong? Or is this expected behavior?

3

I believe you're running into problems with the parse order. When you add quotes, recipients becomes a valid parameter but it isn't parsed yet. When you remove the quotes, it becomes an invalid parameter and is ignored. You should be able to add parse="inward" to the contact_form parameters to parse recipients first.

{exp:email:contact_form
    charset="utf-8"
    form_class="customer-email-form"
    recipients="{exp:stash:get name='recipients'}"
    parse="inward"
}

There is some documentation and examples about this problem here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.