This forum is for module development and code related questions, not general module support. For general support, use the post installation forum.

THIS FORUM IS NOT FOR "What module..." or module support questions-- it's for module development and code related questions.

The module development and code questions forum is intended to aid those who are developing modules or writing code for Drupal.

Please note that this forum is also not intended for "Is there a module that does..." or "I need help with module x..." questions. It's also not a place to ask developers to write your code for you. Please respect this.

Please do not post general discussions intended to target module developers. If the question you have isn't specifically related to writing a drupal module, please post it in a more appropriate forum.

  • If you you have drupal installed already and are seeking a module that does a specific task, have a question about a specific module and what it does or if it will fit your use case, please place your questions in the Post installation forum.
  • If you have a problem or question about a specific module, you should create an issue in the module's issue queue (after checking for an existing issue first).
  • If you don't have drupal installed yet, please place your questions in the Before you start forum.

Programmatically setting an entity reference field on node load

I have Content Type A, which represents individual product preview tiles on my site. I also have Content Type B, which represents individual pages on my site for which individual product tiles are displayed on.

For Content Type B (creating/editing a page), I have entity reference fields (field_tile_1, field_tile_2, field_tile_3) in the create/edit form that let me select any combination of 3 tiles (representing node instances of Content Type A) to be displayed in the rendered output (node) of Content Type B.

Custom autocomplete fields like FirstName LastName without the ids like [:nid] or [:eid]

I was having the issues all time to create custom autocomplete fields without the id(s) populated in the autocomplete field after selecting. How to do that in my custom form?

How to create a module who is displaying data from database


All is in the title, I'm starting on drupal 8, and i have to create a module who is displaying data from a database (mysql), I don't know how to make a good structure, what functions i need etc.

I already did a module "Hello World" to undertsand D8.

Need help


View Reference possible in D8?


lets imagine we created a few articles of content type "News". So we created an own view for it with a display type "page" to see ALL news entries. But what if we could like to show a news ticker maybe on the startpage? I would create a new display type "embed" with a few settings (For example limit it to 5 entries).

Now it would be nice if I could use something like "Entity Reference" to reference to this already renderer embed view in other content types editor. Is that possible?

Using Webform submissions in HTML code


I am trying to format the email sent from a webform. I have everything set up for the webform to send HTML mail when completed. My question is how can I add the submission tokens the webfrom uses into the HTML code.

For example:
When I try to bold this statement using the bold tag: Full name: [submission:values:full_name]
will output only "Full name:" in bold. Does anyone know the correct syntax for doing this?

Thanks everyone!


Subscribe with RSS Subscribe to RSS - Module Development and Code Questions