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

Composer patch submodules

Hello all,

I am trying to patch a submodule: jsonapi_defaults installed with jsonapi_extras (modules/jsonapi_extras/jsonapi_defaults) using composer on Drupal 8.9.10.

I tried the following:

    "extra": {
         "patches": {
        "drupal/jsonapi_extras" : {
        "Configurable JSON:API Max Limit": "https://www.drupal.org/files/issues/2020-08-09/max-page-limit-configurable_2884292_17.patch"
         }
        },

But was not able to apply patch to the submodule.

Thanks in advance.

Create entity if not existe using feeds

I use feeds to import data from csv file with eck entity processor and feeds module drupal 7, in fields of bundel i have entity reference field named nom candidat like in image bellow, but when i import data from csv file i need to create if note existe a new entity candidat in candidat entity type. In this case i have setup used feed entity reference and maping field "nom candidat" to according entity id, but when i upload to file it doesn't create candidat entity if not existe, how i can do that please 

Nested taxonomy checkboxes in custom form

Hello,

In my custom form I'am trying to get values from a nested taxonomy checkboxes field.

$form['test'] = [
'#type' => 'checkboxes',
'#title' => t('title'),
0 => array(
'#type' => 'checkboxes',
'#options' => array('1' => 'one'),
0 => array(
'#type' => 'checkboxes',
'#options' => array('2' => 'two'),
),
),
1 => array('#type' => 'checkboxes',
'#options' => array('3' => 'three'),
),
];

E.OriginalEvent in drupal forms

Hello iam using ajax in my drupal forms and i need to apply a test on my event witch is a user triggered or code triggered!
So, drupal forms provide an event key:
[#ajax] => array(
'event' => 'change',
... )
I need something like this to know about the event origin:

If(e.originalEvent) {

// user triggered

} else {

// code triggered

}

My purpose is to test my event and knowing that change event caused by code triggered (jquery replace html by ajax) or user triggered.

Check/uncheck boolean field when uploading image to media library

Since I can't find a solution, maybe someone can give a hint?

I have a form of a certain content-type where users can enter data and upload images (type: Media Library -> image, entity referencing). In addition, I have a Boolean field (uploaded images: yes / no) that I would like to use elsewhere.

(How) Is it possible that the Boolean field (BF) is automatically checked as soon as the user uploads an image?

I've tried different things:

New Features in Drupal 9

What are the new features that added in Drupal 9?

Pages

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