Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It looks like this module provides exactly what I was looking for... However, my view requires a conditional check to output only one of two editable fields. Excluding both fields from the view and using a replacement pattern to output one of them does not work. Any suggestion / workaround ?
I've tried to implement hook_query_alter, hook__views_pre_execute without any success...
Comments
Comment #1
joachim CreditAttribution: joachim commentedI'd say you probably need to write a custom views field handler which then outputs one of either of the two fields you want.
https://drupal.org/project/views_compound_field might be useful to copy code from.
Comment #2
p0832414 CreditAttribution: p0832414 commentedComment #3
joachim CreditAttribution: joachim commentedAlternatively, you need to use hook_form_alter() to change what's in the form.