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.
By fin_777 on
Hi All,
I am trying to set up some rules using the Rules module, and I am looking for the "Execute custom PHP Code" option .. but no matter what I try, this option doesn't come up anywhere (not under the condition nor under action).
What are the requirements for this option to appear? Any particular modules installed or anything else?
Thanks for your help
Comments
PHP filter
This is just a guess really but have you got the PHP filter module enabled.
Peter J Lord
http://peterjlord.co.uk
Thanks.. It helped me!
That was my silly mistake.. I am new to drupal. Thanks :)
PHP filter, that was it!
Turning on PHP Filter module (in core) did it. Now I have the Execute custom PHP code option.
Beauty!
I just encountered the same problem. Thanks Peter and mr. chips!
how does "Execute custom PHP Code" work ?
Hello,
I have "Execute custom PHP Code" enabled in rules module.
My Requirement:
- Author 'A' creates a node.
- Admin should be able to create a table of contents for the article created by Author 'A'.
- With the custom php code, I should be able to read the data from node and append some more data to the node and save it back.
Do let me know,pointers If any to achieve this task.
Regards.
Should be able to load the
Should be able to load the node with rules so you will have access to the node level.
Peter J Lord
http://peterjlord.co.uk