JFranks22
wading in the water Posts:26
|
08-28-2009 12:53 AM |
|
Hi,
I am adding a dynamic email completion event to my form. I can send the confirmation email to a static email address or an email address included on the form.
I would like to be able to send the confirmation to the email address of the user who has logged into the site. So, the user signs into the site and then can enter orders without needing to complete their personal information every time.
Your help for what email variable to use would be terriific.
Thank you.
|
|
|
|
|
David To
river guide Posts:2719
|
08-28-2009 06:22 AM |
|
Hi, you will need to create a hidden field, such as "UserEmail" and use SQL default option of: select email from users where userid = $(UserID) Then in your Email completion event, use that token as the to email: $(UserEmail) -- Try this out and see if it works for you. -- David |
|
|
|
|
JFranks22
wading in the water Posts:26
|
08-31-2009 10:16 PM |
|
Thank you for the quick reply. I am running some test of method. |
|
|
|
|
JFranks22
wading in the water Posts:26
|
09-12-2009 06:37 AM |
|
David helped me on a other ticket to solve this issue. The SQL should be: select email as defaultvalue from users where userid = $(UserID) |
|
|
|
|
jerops
river guide Posts:99
|
10-14-2009 07:08 AM |
|
Hi David,
I'm trying the same thing, and I've got my SQL to work correctly, however when I put the token in the Email To: field, it's not working...I ran the DEBUG..it shows that it's picking up the correct email address, however when I look at the TO Field it's blank...do you have any suggestions on how I can get this to work...
Jerry |
|
|
|
|
David To
river guide Posts:2719
|
10-14-2009 07:28 AM |
|
Is this an email completion event? What do you have in your TO field? -- David |
|
|
|
|
jerops
river guide Posts:99
|
10-14-2009 07:50 AM |
|
Hi, This is an email completion event and I have a token $(ModEmail) - which was my hidden field shortname. Jerry |
|
|
|
|
David To
river guide Posts:2719
|
10-14-2009 09:17 AM |
|
Can you export your form on www.betasprings.com(username: host, password: dnnhost) and send URL/tabid so I can take a look at it? -- David |
|
|
|
|
jerops
river guide Posts:99
|
|
David To
river guide Posts:2719
|
10-14-2009 10:17 AM |
|
Hi, please check out what I've done. 1) created a question event called "SetModEmail" with SQL default statement: SELECT SubjectModeratorEmail AS DefaultValue FROM OPS_CLMR_Subjects WHERE SubjectName = '$(COURSEsubjectTObeUSED)' 2) I've changed the "ModEmail" to be a textbox to see the value being passed; if it's correct and working properly, then simply switch it back to a hidden field 3) do not set the default value of "ModEmail", use SQL question event to do this -- David |
|
|
|
|
jerops
river guide Posts:99
|
10-14-2009 11:27 AM |
|
Looks good...however I can't seem to get my portal to save that question event...For example I can save a question event about hiding/showing a question, but if I select 'Set question default based on another questions response' and to 'Execute event for any response: ' I cannot save the question event... |
|
|
|
|
David To
river guide Posts:2719
|
10-14-2009 11:44 AM |
|
That's very strange; are you saying that when you click on "Update Question Event" it won't save at all? -- David |
|
|
|
|
jerops
river guide Posts:99
|
10-14-2009 12:03 PM |
|
Okay..if I attach it to one of my questions then it will save...I'm thinking that I just clicked 'Execute event for any response' with first picking a question....but it's working now...thanks your the awesome support!!! Jerry |
|
|
|
|
jerops
river guide Posts:99
|
10-14-2009 01:37 PM |
|
Okay...now it stopped working during my testing..I've found that I have to create a question event that displays another question based on a result...then once that fires..my SQL Question Event fires to update the ModEmail field....It seems like for a SQL Question event to fire it needs a postback from another question.... Jerry |
|
|
|
|
David To
river guide Posts:2719
|
10-14-2009 01:52 PM |
|
Yes, that's correct. Your question event "SetModEmail" only gets triggered when someone chooses from the drop down list and select a '$(COURSEsubjectTObeUSED)' . -- David |
|
|
|
|