close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Email from dynamic dropdown list

Thread began 7/30/2010 9:04 am by christina.elissa4324782 | Last modified 8/16/2010 12:30 pm by Jason Byrnes | 3155 views | 14 replies |

christina.elissa4324782

Email from dynamic dropdown list

I am trying to send an email where the emails that go into the To: field are from a dynamic dropdown list. However, the email will not send. I have attached both the email file and the file with the form. Thank you in advance for your assistance.

Attached Files
email_general.php.zip
Sign in to reply to this post

Eric Mittman

Have you done any checking to ensure that the email select list has the correct email addresses as the values? Also I noticed that you are using multi select list for the email selection. If there is more than one value this could cause things to not work. You should make this a standard select list to see if this allows the email to be sent.

Sign in to reply to this post

christina.elissa4324782

I have changed the list into a plain select list and still nothing.

I am confused as to how to get the the email(s) to be the value(s) of the target list. The dynamic dropdown works in the sense that I see the email as the value in the child list. I can then add and remove the email from the child list into the target list. Isn't that in itself putting the email as the value? Isn't this done with the create child array? I have also tried putting the Set Selected In List behavior on the body tag and then I tried putting it on the target list ( I even tried the child list ) but I am confused as to what the value should be; I have tried both the email from the Child record-set and the target list itself.

In the Getting Started guide, it mentions using dynamic dropdowns in this way, but didn't give further instruction. Is there a step I am missing with the dynamic drop downs for implementing this to email?

I have included the file again just in case.
I hope I am correct in understanding that you are continuing forum-based support in addition to charged technical support and that you will be able to help me.

Attached Files
email_general.php.zip
Sign in to reply to this post

Eric Mittman

There are two separate parts to this, each one needs to be setup and working correctly in order for the emails to be sent. The first part of this is making sure that the final list of values makes use of the email address as the value of that list. When I checked on your Dynamic Dropdowns server behaviors on the most recent page you sent I can see only one create dynamic array. I also do not see any 'populate list from array' behaviors applied to your child select list.

In order to populate the child list successfully you will need to ensure that you have the dynamic dropdowns setup and working properly. It looks to me like you need another create dynamic array from the email rs. When you set this up you will need to relate it to the child list via the foreign key that they share. Once you have this dynamic array created for the email recordset you can then apply the 'populate list from array' behavior to the onchange event for the child select list. Make sure that you are populating the email list with the email addresses as the values. It is ok if these are also the labels.

Once you have this third select list populating with the email addresses as the values you can then use this select list for the 'to' setting in your UE server behavior. You should get it working as a single select list first, then update it to a multi select list afterwards.

Sign in to reply to this post

christina.elissa4324782

I believe I may have confused the situation by keeping the email recordset in the file. I do not believe I need a third recordset for what I want to do. I attempted doing what you suggested but it made the email list function as another child list rather than as a target list like I want. So, I started over.

The dynamic list appears to be working correctly. I can click on the parent list and see the correct information in the child list. I can then add the emails I want into the email list.

The emails are not being transferred to the ‘to’ setting in my email. I have tested by putting an email address in the $RecipArray[$CurIndex ][] = "me@myemail.com"; section (which sends) rather than
$RecipArray[$CurIndex ][] = "".((isset($_POST["email"]))?$_POST["email"]:"") .""; (which does not send)

I assume I am still not putting the email(s) as values in the target/email list. However I believe I have set up the dynamic list correctly and am unsure where else I’m supposed to put the value.

I have the parent record set (referencing a class table) that has classID and className.

I have the child record set (referencing the userInfo table and I LEFT JOIN the classNusers link table in order to connect it with the parent record set) that has classID, userID, and email. I have joined the users table in order to filter out unwanted emails for testing purposes, but will be deleted after everything is resolved.

Thank you again for your help.

Attached Files
email_general.php.zip
Sign in to reply to this post

Eric Mittman

Before you try to debug the email message part of this you need to ensure that you are getting the email addresses into the value of the select list. You should make this a regular select list that has only a single selection first. If you cannot get a select list with the email address as the value this will not work.

I can't trouble shoot this with only the files provided. Do you have a link where I can see your current implementation? After the select list is populated you can view the source on it to see what the values are in this select list. To do any testing on my end I will need a copy of your db in a .sql file.

You will need to first make this a regular select list, then check the source code of the list after adding the email address to ensure that the email address is set for the value.

Sign in to reply to this post

christina.elissa4324782

Here is the page I have done:
email_general.php

Sign in to reply to this post

christina.elissa4324782

here is the sql in a txt file.

Attached Files
32905_lcsfitness.txt
Sign in to reply to this post

christina.elissa4324782

I have checked the source of the page after making a selection. I see the arrays with the email addresses at the top of the page, but the child list and the target list are not populated with anything.

Sign in to reply to this post

Eric Mittman

I think that you are getting very close here. When I check the email list on the page you lined to I can see that you have the values set to the id and the label set to the email:

<option value="60">example@site.org</option>

You will need to ensure that you have the email address listed as the value instead of the 60 that you see here. I think you should make the child list use the same email address column for both the label and value.

Also, until you get this working correctly with a single selection type of list you may have problems with the multi select list since it will not post a single value, it will post an array of values to the page. I can give you some pointers on working with the array of values but it is best to get this working with just a regular select list then afterwards update it to be a multi select list.

Sign in to reply to this post
loading

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...