I created a Joomla 1.7 plugin to add some custom fields to the user profile. As a basis I started with the profile plugin that is included in Joomla as example.
I added a checkboxes field like below:
<?xml version="1.0" encoding="utf-8"?>
<form>
<fields name="profile">
<fieldset name="profile" label="PLG_USER_WISPROFILE_SLIDER_LABEL">
<field name="speltak1" type="checkboxes" label="PLG_USER_WISPROFILE_SPELTAK_LABEL"
description="PLG_USER_WISPROFILE_SPELTAK_DESC">
<option value="Bevers">PLG_USER_WISPROFILE_OPTION_BEVERS</option>
<option value="Welpen Ochtend Horde">PLG_USER_WISPROFILE_OPTION_WELPENOCHTEND
</option>
<option value="Welpen Middag Horde">PLG_USER_WISPROFILE_OPTION_WELPENMIDDAG
</option>
<option value="Scouts Verkenners">PLG_USER_WISPROFILE_OPTION_SCOUTSVERKENNERS
</option>
<option value="Scouts Verkensters">PLG_USER_WISPROFILE_OPTION_SCOUTSVERKENSTERS
</option>
<option value="Explorers">PLG_USER_WISPROFILE_OPTION_EXPLORERS</option>
<option value="Klimstam">PLG_USER_WISPROFILE_OPTION_KLIMSTAM</option>
</field>
</fieldset>
</fields>
</form>
This will correctly add the field to the form during registration and editing the user profile. But when I try to save the profile nothing is stored in the database. The checkboxes field is converted to a array in the $data variable. But the example code can't save this to the database. Does anybody know how to do this?