Custom fieldsets participants added twice
When editing a participant, some custom fieldsets are added twice to the participant edit form. When saving, only the data in the second fieldset is saved (so users think nothing happened when they added the data in the first instance of the fieldset).
This only happens with fieldsets linked to a specific event type.
In templates/CRM/Event/Form/Participant.tpl:
CRM.buildCustomData( '{$customDataType}', null, null );
{if $eventID}
CRM.buildCustomData( '{$customDataType}', {$eventID}, {$eventNameCustomDataTypeID} );
{/if}
{if $eventTypeID}
CRM.buildCustomData( '{$customDataType}', {$eventTypeID}, {$eventTypeCustomDataTypeID} );
{/if}
- First buildCustomData : adds all custom field sets, except those linked to a specific event id
- Second buildCustomData : adds all custom field sets linked to a event id
- Third buildCustomData : adds all custom field sets linked to a specific event type id
So the combination of the first and third one is the cause of fieldsets added twice.
Solution? Altering template, changing arguments, fixing getTree() in CRM/Core/BAO/CustomGroup.php, ... ?
See also