3: Re: PHP support (response to 1)
Posted by Joe Oldak on

Hi,

There's no PHP support in Voice. You can't add any kind of server-side scripting to your site. You can in theory do things with JavaScript by adding it into pages or into files that are in your assets library, but this is reasonably advanced stuff of course!

There's no way to set up rules about which email addresses get emailed from Surveys or Forms - these always go to the same address, as specified in the settings.

One option would be to use tools outside of Voice to do the routing. e.g., if Voice always sent the email to a gmail account, you could use the email forwarding rules in gmail to then send those on to different recipients based on the content of the email.

Thanks

Joe

4: Re: PHP support (response to 3)
Posted by Cdhs web administrator on

Ok thanks for the info. An alternative is to create a Google Form and use Google Apps Script (which is an extension of Javascript), which has a GMail object that allows you to do this. Then embed the Google Form in a Raw HTML includelet in e-voice. This also allows us to generate the email body content in a format different to that generated by e-voice Forms. I'll try it and let you know.

5: Re: PHP support (response to 4)
Posted by Cdhs web administrator on

I tried the Google Forms approach. I replaced the previous e-voice Form with a link to a Google Form (opens in a new window). The Google Form has a trigger for OnFormSubmit that fires an Apps script handler that parses the form responses and generates an email to the site managers of just those sites selected in the checkbox. Its a bit tricky to set up but it does work ok. If anyone else needs functionality like this I can give details of how to do it. The form is on our "Apply for a plot" page. Many thanks.