close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Multiple Emails from selects

Thread began 5/29/2011 5:52 am by vernon webb | Last modified 5/31/2011 11:23 am by Jason Byrnes | 1986 views | 7 replies |

vernon webb

Multiple Emails from selects

I need to setup a form that allows users to select multiple users.

A recordset doesn't work because it contains all the users and I want the recipient to be selected by the user.

I thought I could setup a dynamic menu poplulated from the recordset and allow users to select multiple recipients from there, which works but only the last person selected receives it.

Any ideas on how to make this work? Thanks...

Sign in to reply to this post

Jason ByrnesWebAssist

see this thread for details:
showthread.php?t=20790

the example given is for a static multiple select list, but it works exactly the same for a dynamic multiple select list.

Sign in to reply to this post

vernon webb

This did not work for me. If I add the [] it doesn't work, but when they are not there it does, but only goes to one person, the last one on the list.

Sign in to reply to this post

Jason ByrnesWebAssist

for the list to pass multiple selections, the name needs to end in "[]"

if the square brackets are not in place, only the last selection made is passed.


send a copy of your page with the "[]" in place so I can examine the code.

Sign in to reply to this post

vernon webb

I do understand, however it didn't work for me. The page is attached

Sign in to reply to this post

Jason ByrnesWebAssist

you missed this part from the thread i linked to:

  In universal email, when you bind to the email address form element, it will include the "[]" in the binding code:
php:
<?php echo((isset($_POST["toAddresses[]"]))?$_POST["toAddresses[]"]:""?>

these should be removed from the binding code:
php:
<?php echo((isset($_POST["toAddresses"]))?$_POST["toAddresses"]:""?>
  





on your page, find the following line of code:

php:
$RecipArray[$CurIndex ][] = "".((isset($_POST["toAddresses[]"]))?$_POST["toAddresses[]"]:"")  ."";




and change it to:

php:
$RecipArray[$CurIndex ][] = "".((isset($_POST["toAddresses"]))?$_POST["toAddresses"]:"")  ."";
Sign in to reply to this post

vernon webb

That worked great, thanks

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...