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.
I am trying to add a node creation form in the header of a view with the following code using the Views PHP module:
<?php
if (!function_exists('node_add')) {
module_load_include('inc', 'node', 'node.pages');
module_load_include('inc', 'media', 'includes/media.pages');
}
print drupal_render(node_add('talent_image'));
?>
The form comes up but the "Select media" button is shown as a link and it has a "Remove media" button beside it with a text box below it with the value 0. Clicking any of these does nothing. I want to know which include files I need to include for this to work like how it would on the node creation page.
Comments
Comment #1
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedClosing this issue as outdated. However, if you think this issue is still important, please let us know and we will gladly re-open it for review.
sincerely,
- the Drupal Media Team