Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Biz Form Logic View modes: 
User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 2/23/2010 7:35:15 PM
   
Biz Form Logic
Can I add logic to a Biz Form with the GUI?

User avatar
Kentico Support
Kentico Support
kentico_radekm - 2/24/2010 8:11:30 AM
   
RE:Biz Form Logic
Hello.

Unfortunately not via GUI. You will need to modify the code in your Visual Studio as per your requests. You can find more info about adding custom action to a bizform here: http://devnet.kentico.com/docs/devguide/index.html?adding_custom_actions_to_a_bizform.htm

Best Regards,
Radek Macalik

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 2/24/2010 8:17:11 AM
   
RE:Biz Form Logic
Thanks Radek! I did see that guide but wondered about having different logic. What actions can I perform my logic on? On the example it shows OnAfterSave. I want to have some logic to say if they click/select this button/checkbox (prior to saving) then show these controls.

User avatar
Kentico Support
Kentico Support
kentico_radekm - 3/4/2010 8:45:00 AM
   
RE:Biz Form Logic
Hello.

There is 16 handlers you can use for your bizform. You can see them if you open Kentico solution in your Visual Studio, open /WebParts/BizForms/bizform.ascx, switch to Design mode, go to its Properties -> Events.

If you want to access particular field or check its value, you can do it using this API:
BizForm.BasicForm.FieldControls["Example"];, where BizForm is code-name of your bizform and "Example" is the name of appropriate field.

For example, if you want to get a value of e-mail field, you can use this code:
CMS.FormControls.FormEngineUserControl em1 = (CMS.FormControls.FormEngineUserControl)BizForm.BasicForm.FieldControls
["Email"];

You can also use Form control in bizform´s field and use any custom logic in code-behind of this form control.

Best Regards,
Radek Macalik

User avatar
Member
Member
scott_hancock-urmc.rochester - 3/8/2011 3:57:50 PM
   
RE:Biz Form Logic
I'm interested in seeing the example code you mention, http://devnet.kentico.com/docs/devguide/index.html?adding_custom_actions_to_a_bizform.htm, but that page is not found when I navigate to it.

User avatar
Kentico Support
Kentico Support
kentico_radekm - 3/9/2011 9:44:52 AM
   
RE:Biz Form Logic
Hello.

Please find proper links here:

http://devnet.kentico.com/docs/devguide/modifying_the_code_of_standard_web_parts.htm
http://devnet.kentico.com/docs/devguide/api_bizforms_customization_possibilities.htm

Best Regards,
Radek Macalik