I've added a custom field set to the Participant entity, but I need to it allow for multiple values. I've noticed that the Contact entity has no problem with this, but is there a reason why it doesn't give you this option for other entities?
I've found the cause in this function in the templates/CRM/Custom/Form/Group.tpl
file:
/**
* Check if this is a contact-related set and show/hide other options accordingly
*/
function showHideStyle() {
var
extend = $(this).val(),
contactTypes = {/literal}{$contactTypes}{literal},
showStyle = "{/literal}{$showStyle}{literal}",
showMultiple = "{/literal}{$showMultiple}{literal}",
showMaxMultiple = "{/literal}{$showMaxMultiple}{literal}",
isContact = ($.inArray(extend, contactTypes) >= 0);
if (isContact) {
$("tr#style_row, tr#is_multiple_row").show();
if ($('#is_multiple :checked').length) {
$("tr#multiple_row").show();
}
}
else {
$("tr#style_row, tr#is_multiple_row, tr#multiple_row").hide();
}
if (showStyle) {
$("tr#style_row").show();
}
if (showMultiple) {
$("tr#style_row, tr#is_multiple_row").show();
}
if (!showMaxMultiple) {
$("tr#multiple_row").hide();
}
else if ($('#is_multiple').prop('checked')) {
$("tr#multiple_row").show();
}
}