I have a module that queries for a specific webform submission data and sends an array of the results to the view.
When I dpm the array before the return, it shows what I would expect. An array of strings. In my view, I am getting only one field object and it is the first letter of each element in my array. I was expecting to see a field list of each element in the array
Hi, I am trying to run a query in a custom module to get submissions from a web form. I am new to Drupal and Drupal database queries; but not new to databases and queries. My queries work in phpMyAdmin. I am working on a project that is in Drupal 7. I have tried many examples from Drupal documentation but every query I try I get:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM node node' at line 3
Whats the best way to learn drupal module development?
I am guessing this comes up a fair bit. But if I was looking to learn drupal 8 module development, does anyone have any recommendations for books to learn from? Or am I better off with online courses?
I am currently going through the freecodecamp tutorials (which don't cover PHP nevermind drupal module dev). Therefore I am a complete new comer to Drupal (although I did dabble making a module under Drupal 5),
I am trying to add a "Save & Send Email" button to both the Node Add and Node Edit forms of a Content Type to give the Current User the option of sending themselves an email after saving the content. I have put together code that works to add the button and to generate the email, but I cannot figure out how to have the button (#submit) trigger sending the email. Could someone please help me tie them together? I am also not sure how (if?) to implement both the hook_entity_insert and hook_entity_update in the same module. The code I have so far is: