Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > Programmatically View modes: 
User avatar
Member
Member
m.vandenberk-2binteractive - 1/29/2010 3:42:22 AM
   
Programmatically
Hi people,

I've been trying to figure out the following for a while, hope you guys can help me out here.

We've created a BizForm which allows users to register for a course.
The registration needs to be sent to an email adres, which we can set in the CMS Desk under 'Tools' -> 'BizForms' -> 'Notification e-mail' -> 'To e-mail'.

The e-mail address however is not supposed to be static. Our BizForm includes a dropdownlist filled with a list of locations where the specific course is given and since each location uses a different e-mail address we want to fill the 'To e-mail' field with the e-mail adress from the selected location.

In order to retrieve this specific e-mail address we need to execute a query on our SQL database (we have two custom tables 'Content_course' and 'Content_location'.

We've tried using a hidden dropdownlist with a SQL query and Custom macros, but neither of those two worked.

Could anyone help us with this problem.

Thanks in advance!

User avatar
Member
Member
m.vandenberk-2binteractive - 1/29/2010 3:43:46 AM
   
RE:Programmatically
I'm sorry for the lack of a proper title, forgot to set this one and I can't edit my own post.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/1/2010 6:03:03 AM
   
RE:Programmatically
Hi,

I sent a message to your colleague earlier but I will post it here as well.

You can do this by modifying the code of the bizfrom web part. In that example is used the sample how to send e-mail after the bizform is submitted. You will also need to get the values from the field(s) you need, for example from the BasicForm class, where you ca use methods to get the data of the bizform and then decide where to send the message.

Best Regards,
Juraj Ondrus