Tried using profile2 module, got these warnings as well as some warnings when displaying the form:

    * Notice: Undefined index: select_other_list in cck_select_other_process() (line 191 of sites/all/modules/cck_select_other/cck_select_other.module).
    * Notice: Undefined index: select_other_list in cck_select_other_process() (line 199 of sites/all/modules/cck_select_other/cck_select_other.module).
    * Notice: Undefined index: select_other_list in cck_select_other_process() (line 201 of sites/all/modules/cck_select_other/cck_select_other.module).
    * Notice: Undefined index: value in list_field_is_empty() (line 394 of modules/field/modules/list/list.module).
    * Notice: Undefined index: value in list_field_is_empty() (line 394 of modules/field/modules/list/list.module).
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mradcliffe’s picture

Title: Not working for non-node entities » Not working for profile2 entity

I just tested it with Taxonomy, and that is working fine. I think this was specifically for profile2.

mradcliffe’s picture

profile2 module does not seem to have the same values in $form_state['values'] as anything else... I don't know if this is coming directly from Profile 2 or Entity API yet.

mradcliffe’s picture

Status: Active » Needs work
FileSize
6.73 KB

I can't think of any other way to do this, but something ugly like this. Each time I try to architect around any number of parents in $element['#parents'] I run into problems.

mradcliffe’s picture

Status: Needs work » Needs review
FileSize
5.92 KB

Okay, with some research I was able to do this, and what's more, this also makes the Javascript much simpler!

Performance AND bug fix in one patch!

I will probably commit this in the next week as it passes tests and manual testing with profile2 and non-container. This also might fix conditional field and flexifield so I will probably keep this open to back port to Drupal 6.

mradcliffe’s picture

No, it does not fix conditional fields, field_conditional_state, or flexifield (after doing a test port to 6).

mradcliffe’s picture

Title: Not working for profile2 entity » Not working for profile2 entity and field_conditional_state
Status: Needs review » Patch (to be ported)
FileSize
6.41 KB

It was trivial (3 lines of missing properties) to add support for field_conditional_state, which will hopefully become conditional_fields/dependent_fields in D7.

I'll include it with the push of changes in this issue (different commit).

mradcliffe’s picture

Status: Patch (to be ported) » Fixed

Pushed!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.