0

I have a view and have styled the view with a Twig template. The view show nodes whose content type is Programs. I would like to add a Upload button in the view so that admininistrator users can add reports. The view structure is the following one.

screenshot

Is this possible through the Drupal UI?

I created the File upload field as a file type, but it is allowing administrators to add files only through the node page.
Is there a way to make the upload button appear on the view itself?

1
  • You could let your view display entity operations and then add a custom operation "upload file" which opens a custom form (maybe in a modal) to upload the file and attach it to a node in this form's submit handler. Or simply use the existing "edit node" entity operation.
    – leymannx
    Apr 24, 2020 at 9:43

1 Answer 1

1

There is a beta version of a module that can help you achieve this:

https://www.drupal.org/project/views_entity_form_field

This module provides the ability to add form field widgets to a view to edit multiple entities at one time.

Form field options will show up in a View's "Add field" list, prefixed with "Form field: " and then the name of the field being added.

1
  • Thanks ! this helped me :)
    – Rick
    Apr 24, 2020 at 12:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.