I 'm new to Drupal and I am trying to convert a simple PHP form to Drupal. The original PHP form collect some data from the user, does some processing and output a new page (report) to the user. From the Drupal Form API documentation, it seems that FormBase can be used to collect and validate the user inputs. My question is how to create a new page/report in submitForm() function ? Most examples use messenger service to display the result in the same form page. Any direction and pointer to get this done is appreciated. Examples will be great !
I would like to have a bodyfield already filled in when I create the node. Unfortunately this is a lot of text in html, so I can't solve this with the https://www.drupal.org/project/prepopulate module.
But I would like to build a small mini-module for this. I would like to drag the content from another node via nid and copy it into the body field of the node I am creating.
For this I would like to use the hook_entity_create Hook. Am I basically correct? My program looks like this at the moment:
I'm new to Drupal and I'm trying to understand the best approach for this. I need to have a few custom content types, each of which needs to have a few basic fields.
I have a grid that shows list of attachments from comment. The attachments are not published sutomatically after they are uploaded, rather i collect them in a view and display as a grid in a page. Is there a way to have a check box or button to publish attachments in a grid? Is it possible?