Alex, has there been any progress on making checkboxes available for signup.php/profile.php? I have a lot of demographics that I want to track for my members and checkboxes would really help. Thanks, Steve
unfortunately, it is impossible in current version. however, it is possible to replace checkboxes with select boxes in admin area (checkboxes keeps on the signup page).
The FAQ item "Adding Fields" says "3. To add SELECT/RADIO fields" but it only shows how to add a select field. Is it possible to provide an example of how to add a radio button? Thanks, Mike
Change will be in template: instead of Code: <tr> <th><b>Where did you hear about us?</b><br> <small>please stell us how you heard about out site.</small></th> <td nowrap><select name=where_heard size=1> {html_options options=$config.where_heard_items selected=$smarty.request.where_heard} </select> </td> </tr> use: Code: <tr> <th><b>Where did you hear about us?</b><br> <small>please stell us how you heard about out site.</small></th> <td nowrap> {foreach from=$config.where_heard_items key=v item=v} <input type=radio name=where_heard value="{$k}" {if $k==$smarty.request.where_heard}checked{/if}>{$v}<br> {/foreach} </td> </tr>
Below is my scripts. But it didn't show the existed value when I try to edit profile. It only show in admin panel. See what did I miss? Thanks. In config_inc.php add_member_field('student', 'You Are', 'radio', 'student', '', array('options' => $items = array( 'student' => 'Student', 'non-student' => 'Non-student' )) ); $config['student_items'] = $items; In profile.html <tr> <th width=40%><b>Form Studying</b><br> </th> <td nowrap><select name=student_level id=student_level size=1> {html_options options=$config.student_level_items selected=$user.student_level} </select> </td> </tr>
Sorry this is the correct scripts in config.inc.php In config_inc.php add_member_field('student_level', 'Form Studying', 'select', 'form studying', '', array('options' => $items = array( 'k1' => 'K1', 'k2' => 'K2', 'k3' => 'K3', 'p1' => 'P1', 'p2' => 'P2', 'p3' => 'P3', 'p4' => 'P4', 'p5' => 'P5', 'p6' => 'P6', 'f1' => 'F1', 'f2' => 'F2', 'f3' => 'F3', 'f4' => 'F4', 'f5' => 'F5', 'f6' => 'F6', 'f7' => 'F7', 'undergraduate' => 'Undergraduate', 'postgraduate' => 'Postgraduate' )) ); $config['student_level_items'] = $items;