I knew I would ran into some troubles
...
so I want to set up a contact form with a checkbox where one can select to whom the message goes. Most of the recipients are saved in a database (or better clonable template
), just the site admin is not in this, so I have to make a little work around. Problem is when I read out the recipients via <cms:each> I only get the recipients from the template, not the adress for the admin. Only when I select only the admin I get his adress. Here is the code:
Input field for the form:
This I use to read out the adresses saved in the clonable template and - which is not really working and therefore my problem - to insert the adress for the admin should he be selected as well.
Any help would be muchly appreciated!

so I want to set up a contact form with a checkbox where one can select to whom the message goes. Most of the recipients are saved in a database (or better clonable template

Input field for the form:
- Code: Select all
<cms:input
name="recipients"
label="Send to"
desc="Select recipients. Select 'Site Admin' for website related issues."
opt_values="
<cms:pages masterpage='php/WHATEVER.php' page_name='SOMEONE'><cms:show k_page_title/>, (<cms:show city/>)</cms:pages>=SOMEONE |
<cms:pages masterpage='php/WHATEVER.php' page_name='SOMEONE2'><cms:show k_page_title/>, (<cms:show city/>)</cms:pages>=SOMEONE2 |
...
Site Admin=admin"
type='checkbox'
required='1'
/>
This I use to read out the adresses saved in the clonable template and - which is not really working and therefore my problem - to insert the adress for the admin should he be selected as well.
- Code: Select all
<cms:each frm_recipients as='recipient'>
<cms:if recipient='admin'>something@admin.com,<cms:else />
<cms:pages masterpage='php/WHATEVER.php' page_name="<cms:show recipient/>"><cms:show email/>, </cms:pages></cms:if>
</cms:each>
Any help would be muchly appreciated!