Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > BizForm Drop-Down List Vlaue View modes: 
User avatar
Member
Member
brian-haveninteractive - 7/24/2009 4:40:51 PM
   
BizForm Drop-Down List Vlaue
I have a BizForm with a Drop-Down list field named "Campus".

I have defined the Options as follows (not using a SQL Query):

;Please Select
1;University
2;Residential Campus
3;Arizona
4;Indiana
5;Kansas City
6;Wisconsin
7;Online Campus
8;International Campus
9;Police
10;Healthcare

When the email notification is sent to the user, it is sent back the option value and not the name. For instance, the user gets "1" instead of "University", which is not very useful.

The notification email is set up with $$value:Campus$$ in the table layout. Is there a different macro, or syntax, that I can use to get the name value for the selected option to be sent in the notification email?

Thanks

User avatar
Member
Member
brian-haveninteractive - 7/27/2009 12:41:50 PM
   
RE:BizForm Drop-Down List Vlaue
I also tried with a SQL Query to a Custom Table, but with that method I also only got the ID value back in the notification email. I'm not sure if there is some special code that I can use to get the actual text that corresponds to the selected value.

I then figured I could work around the issue by changing my Ooptions (not a SQL Query), to the following.

;Please Select
University;University
Residential Campus;Residential Campus
Arizona;Arizona
Indiana;Indiana
Kansas City;Kansas City
Wisconsin;Wisconsin
Online Campus;Online Campus
International Campus;International Campus
Police;Police
Healthcare;Healthcare

It seems to work. May not be the best solution, but it's something... If anyone know how to do this better, please share.

User avatar
Kentico Consulting
Kentico Consulting
kentico_mirekr - 7/27/2009 1:01:19 PM
   
RE:BizForm Drop-Down List Vlaue
Hi,

I think this is correct approach and I would definitely advise you to go this way.

Best Regards,
Miroslav Remias.

User avatar
Member
Member
richduff-btinternet - 7/8/2010 5:10:49 AM
   
RE:BizForm Drop-Down List Vlaue
I have the same problem, but need the values and names to be different. The names get displayed, but the values are used when sending the message. This is fine, but I also need the selected name as well.
Rof example, the drop down list contains a list of Email adresses, together with their friendly name, e.g. enquiries@testcomapny.co.uk, Support Team.
I need to be able to get both the email address and the friendly name.

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 7/20/2010 4:11:32 AM
   
RE:BizForm Drop-Down List Vlaue
Hello,


Regrettably, we do not have any built-in macro to get the text value to e-mail.

You could send the e-mail by our API after BizForm save instead of built-in notification/autoresponder feature. You can get all values of BizForm and send the new message by API. I would recommend you storing the options for dropdownlist in the custom table and using a SQL query for dropdownlist. Please see here: http://devnet.kentico.com/docs/devguide/custom_tables_module_overview.htm for more information about custom tables. Then you could access the table to get the text value if you know the value from BizForm data.

Please see the sample code here: http://devnet.kentico.com/docs/devguide/modifying_the_code_of_standard_web_parts.htm


Best regards,
Helena Grulichova