-1

I like ExpressionEngine, but I'm starting to doubt its power.

For example, I'm looking for a checkbox fieldtype for custom Member Profile Fields but I'm not finding anything.

Why aren't checkboxes a default option for custom member profile fields?

Is there is a plugin out there or a simple hack for EE2?

rjb
  • 9,036
  • 2
  • 44
  • 49
digiwig
  • 621
  • 1
  • 9
  • 21

3 Answers3

1

if you are asking to be able to set default values to custom channels fields, well, it's not currently possible, and there is no addon to do that. In fact, I tried to create such extension, but I realized that it was not feasible with existing hooks.

pvledoux
  • 973
  • 1
  • 10
  • 23
1

You can build it by using the 'cp_js_end' to insert some js in order to add a checkbox, hide the default label and populate it dynamically from the checkbox state with text such 1 or 0, true or false...

Thats how modules such as member categories are made to support non-text fields.

EE guy
  • 11
  • 1
0

This works on ExpressionEngine v2.2.0.

See the list of php files which you will need (in no particular order)...

  • system/expressionengine/views/members/register.php - line 209
  • system/expressionengine/views/members/edit-profile.php - line 70
  • system/expressionengine/controllers/cp/members.php - lines 2988 and 3086
  • system/codeigniter/system/helpers/form_helper.php - get the function names form_radio, form_checkbox, form_multiselect
  • system/expressionengine/controllers/cp/myaccount.php - line 309
  • system/expressionengine/modals/member_modal.php - line 536 - use foreach on $data array to implode new field arrays.

There are probably a few more pages that need som attention, but this is enough to get going. Any new field types must be created in exp_member_fields.

digiwig
  • 621
  • 1
  • 9
  • 21