Closed (works as designed)
Project:
Multi-column checkboxes radios
Version:
6.x-1.6
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
13 Nov 2010 at 22:39 UTC
Updated:
10 Dec 2010 at 23:06 UTC
Comments
Comment #1
mattyoung commented>I found the multicolumn attribute to already be included
How does this happen? I looked at the source of profile_checkboxes.module and don't see doing this.
>I ultimately modified to set the width to 3 columns
How do you make the modification?
Can I see the dump of the form array?
Comment #2
cyberm4tic commentedSure, and again thanks for the help.
When I do a dump of the array in user-register.tpl.php without any tampering, I get this:
And I make the modification by altering the form in the template file as such
$form['Athletic Information']['profile_sports']['#multicolumn'] = array('width' => 6);I then pass the form through drupal_render. Judging from your response, this was not how the modification was intended to be made. I initially understood it as a module that allowed you manipulate FAPI directly.
Either way, I used the profiles checkbox module to create a list selection profile field that substituted checkboxes for the old-school method of CNTRL and click as many choices as are suitable.
Comment #3
mattyoung commentedI see the #multicolumn stuff is there. Something must be setting it. I wonder how that gets there because profile_checkboxes is not doing it, at least I don't see it in the source that I can tell.
+++ where do you find the user-register.tpl.php file? I can't find it.
The problem is drupal form building doesn't work the way you expect: you cannot feed the form array to drupal_render() and expect to get the correct result. All forms are created by drupal_get_form() which internally goes through a form building process that do a lot of things to the form array, after that, then finally drupal_render_form() is called to render out the HTML. The version of the form array you are seeing is raw, it hasn't gone though the form building process inside drupal_get_form().
What you need is to make a module and implement hook_form_FORM_ID_alter(). Something like this:
Comment #4
mattyoung commented~
Comment #5
salientknight commentedI'm a little confused about part of the answer. Does this work with the User Registration profil_checkboxes?
Thank you,
-=Sal=-
Comment #6
mattyoung commentedNo it does not. You need to implement hook_form_alter() to change to profile_checkboxes form element