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.
For custom action configurations we need feature support for states attribute similar to #state of form API.
Comments
Comment #2
JayKandari#states like functionality is directly not supported when defining parameters for a rule action in
hook_rules_action_info()
This can be achieved by attaching a 'form_alter' callback function to our action. Eg:
Callback method :
Comment #3
gg24 CreditAttribution: gg24 as a volunteer and at QED42 commentedAwesome! @jaykandari. This works for me.
Thanks!
Comment #4
TR CreditAttribution: TR commentedThis was answered by #2.
Comment #5
TR CreditAttribution: TR commented