Search

I've got a contact form with a selectbox for users to select the type of inquiry. I want to provide the value of the select (a system username) to the Send Email filter as a recipient name. Here's the field code:

   <label for="fields[recipient]">Type of Inquiry</label>
   <select name="fields[recipient]">
     <option value="admin">General Inquiry</option>
     <option value="zheng">Press Inquiry</option>
   </select>

admin and zheng are authors in the system. Now, here's how the info gets passed to the Send Email filter:

  <input name="send-email[recipient]" value="fields[recipient]" type="hidden" />
  <input name="send-email[sender-email]" value="fields[email]" type="hidden" />
  <input name="send-email[sender-name]" value="fields[recipient]" type="hidden" />
  <input name="send-email[subject]" value="fields[subject]" type="hidden" />
  <input name="send-email[body]" value="fields[message]" type="hidden" />

This is not working. The entries save, but no email gets sent. However, if I directly input the value of fields[recipient], it does work. For example:

  <input name="send-email[recipient]" value="zheng" type="hidden" />

I've tried debugging by using fields[recipient] elsewhere, like in send-email[sender-name]. I get the value expected: either admin or zheng. For some reason, though, I can't use it to set the email recipient.

Anyone else experience this? Any ideas?

I've got the same problem...

Line 174+ of /toolkit/events/event.section.php is responsible for figuring out the recipients. This field does no behave like the others, I.E. it is not looking for dynamic values like the other fields. Potentially it could be able to by using the __sendEmailFindFormValue() function, which is in use a little below that line.

This has been added/fixed in 2.0.2

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details