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.

What's the best way to capture IDs of clicked-on inputs in a behaviors file when they're used in AJAX?

Is it possible to capture IDs of clicked-on inputs using logic from a behaviors file when the inputs are used in AJAX?

At a high level, I'd like to capture the IDs of elements when they're clicked-on. It looks like I can do it individually when using a mousedown handler with the respective IDs, but I want it to be more abstract in the sense of having a dynamic way of not needing to reference the ID in the code if possible.

Drupal 10.5: How does one modify where a respective AJAX button's progress indicator gets displayed?

I'm working on a custom module and one of the fields it has on its settings page is an AJAX button configured as follows:

Is there any Drupal core API to expose View filter metadata (time, pagination, etc.)?

I have created a View that exposes an API endpoint for audit logs. In this View, I configured several exposed filters such as time range and pagination.

My question is: Does Drupal core provide any built-in API or endpoint that returns metadata about these filters (for example which filters are available, filter names, allowed parameters, etc.)?

I want to know if I can call a Drupal API that gives information about all exposed filters for a View.

Thanks!

Where to find BaseFieldDefinition:: Properties

I am playing with code to define base fields in a custom entity created in a module.  For example...

Updating language for existing content

Hi friends,

I have multilingual site. And there are content originally created in 'es' (Spanish) language. Now, we have to change all those existing content to 'en'. In my custom drush command, tried below thing but now working --

After loading the node object trying to change it like this --

$node->set('langcode', 'en');
$node->save();

It is giving this error --

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions