Design and CSS styles
Version 3.x > Design and CSS styles > Bizform Multiple Choice Field Custom layout View modes: 
User avatar
Certified Developer 8
Certified Developer 8
bryan-bit-wizards - 9/19/2008 10:58:08 AM
   
Bizform Multiple Choice Field Custom layout
I have a biz form with a multiple choice filed. My issue is that there are only 2 options for displaying this field (Horizontal / Vertical). Is it possible to customize the layout when it is rendered on the page. I have 20+ values in the biz form and displaying only horizontally/vertically is not suitable. Ideally i would like to display rows of 3 across.

Version: 3.1a
Site template: Blank ASPX

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 9/22/2008 2:10:08 AM
   
RE:Bizform Multiple Choice Field Custom layout
Hi,

You could develop your own form control – please see here: http://devnet.kentico.com/docs/devguide/developing_form_controls.htm for more information.

You could take an advantage of ‚Checkboxlist‘ control and set the property of ‚RepeatColumns‘ according your needs.

Best regards,
Helena Grulichova

User avatar
Certified Developer 8
Certified Developer 8
bryan-bit-wizards - 9/22/2008 2:56:55 PM
   
RE:Bizform Multiple Choice Field Custom layout
Can you tell me the ascx file that the "Multiple Choice" field type uses so I can use that a model for developing my custom form control? I can't determine which one it uses int eh CMSFormControls folder.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 9/23/2008 3:44:50 AM
   
RE:Bizform Multiple Choice Field Custom layout
Hi,

You can use the .Net default Checkbox List control for this.

Best Regards,
Juraj Ondrus

User avatar
Certified Developer 8
Certified Developer 8
bryan-bit-wizards - 9/24/2008 11:22:40 AM
   
RE:Bizform Multiple Choice Field Custom layout
Can you please tell me where in the source code is the code to write out a bizform field? I would like to see where it dynamically creates the input/label tags for a multiple-choice field type when displaying a bizform on the site.

User avatar
Kentico Support
Kentico Support
kentico_radekm - 9/24/2008 4:20:26 PM
   
RE:Bizform Multiple Choice Field Custom layout
Hello,

bizform data are stored in separate DB table (CMS_Form table) (uploaded files are stored in file system).

You can find more info and also example of managing bizform data via API in our Developer's Guide, here: http://devnet.kentico.com/docs/devguide/api_examples.htm

Best Regards,
Radek Macalik

User avatar
Certified Developer 8
Certified Developer 8
bryan-bit-wizards - 9/25/2008 8:39:01 AM
   
RE:Bizform Multiple Choice Field Custom layout
I don't think you understand what I need.

My BizForm has a "Multiple Choice" field type in it. That field get's it data from a SQL query. That query returns 20+ records. The only options for displaying the field are "Repeat Direction: Horizontal" and "Repeat Direction: Vertical". Both of these are unacceptable as there are 20+ checkboxes created when the BizForm is rendered.

I'm trying to find a way to customize the checkboxes so that they rows of 3 across. In my previous posts I was trying to determine where in the source code it creates the table structure for a "Multiple Choice" field type in a BizForm.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 9/26/2008 5:12:35 AM
   
RE:Bizform Multiple Choice Field Custom layout
Hi again,

I think that for this is the easiest way to develop custom form control with the layout as you want to - http://www.kentico.com/docs/devguide/developing_form_controls.htm


In the source code you can find it in the FormEngine assembly and the most logic is in the BasicForm file.


Best Regards,
Juraj Ondrus

User avatar
Member
Member
Josh Larios - 11/6/2009 4:39:23 PM
   
RE:Bizform Multiple Choice Field Custom layout
Hey, did you ever get this figured out? I'm trying to do pretty much the same thing, with 4.1, and not having much luck.

User avatar
Certified Developer 8
Certified Developer 8
bryan-bit-wizards - 11/9/2009 11:36:31 AM
   
RE:Bizform Multiple Choice Field Custom layout
I was never able to find a solution for this. I ended up just designing around the existing functionality.

User avatar
Member
Member
kentico_pavelk - 11/10/2009 2:43:01 AM
   
RE:Bizform Multiple Choice Field Custom layout
Hi,

As my colleagues mentioned before, you may develop a custom form control and then use it as a BizForm field. Basically, you get some records from the database and then you may generate a table layout of the check boxes. Developing custom form controls is described here:
http://www.kentico.com/docs/devguide/developing_form_controls.htm


Best regards
Pavel Knotek

User avatar
Member
Member
Josh Larios - 11/10/2009 11:56:48 AM
   
RE:Bizform Multiple Choice Field Custom layout
It would be a lot easier to develop that custom form control if the source to the existing "Multiple Choice" or "Radio buttons" form controls were available. I'd much rather just make small changes to your code than have to re-implement those two controls from scratch. Plus, if I could alter how those two work, I wouldn't have to educate our users on how to choose our custom form controls when they want a checkbox or radio button, instead of using the built-in ones.

User avatar
Member
Member
kentico_pavelk - 11/20/2009 5:59:37 AM
   
RE:Bizform Multiple Choice Field Custom layout
Hello,

Since these controls are part of the source code, developing a custom form control is the only way to achieve your goal. You can set its Control Display name property to some user friendly value so your users will remember it easily.


Best regards,
Pavel Knotek