Easy to reproduce. Enable Util's Module Weight module. Set MERCI to -50 or something that makes it lighter than Date so it runs before Date. Instead of seeing the Date fields, users will only see the 'Limit Lists to Available Items' button.
Instead of adding to the $form['field_merci_date'] array, it looks like Date skips it if the array already exists. Not sure there is a way to fix this other than making sure MERCI's form alter runs after Date.
$form['field_merci_date'][0]['merci_date_filter'] = array(
'#type' => 'submit',
'#value' => t('Limit Lists to Available Items'),
'#weight' => 10,
'#submit' => array('merci_date_filter'),
'#ahah' => array(
'path' => 'merci/js',
'wrapper' => 'merci-choice-wrapper',
'method' => 'replace',
'effect' => 'fade',
),
Comments
Comment #1
darrick commentedThe above code for generating the 'Limit Lists to Available Items' uses a array key which conflicts with the key used by the content module to add the field_merci_date form. This causes the date fields to not show up. If you have the issue set the weight of the content module less then that of the merci module.
To fix this permanently it would be best to implement a theme function and not use the field_merci_date key for the merci_date_filter button as this is more of an issue with the presentation layer then the implementation layer.
http://drupal.org/node/751826
Comment #2
kreynen commentedSimply moving this to an #after_build function ensures the field_merci_date exists before the button is added
http://drupal.org/commitlog/commit/8578/0e941bd71e091a037332f3d15ce50fb2...
Comment #3
darrick commentedWorks well. Thanks kreynen.