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

Editable fields still needed?

Many moons ago - too many - I created editable fields. 
I was expecting not to need it in Drupal 9. 

It still, to me, feels like fundamental functionality, to be able to 'display' either the editable, or the rendered version of a field ?

Am I missing something?

Cheers
Mark.

INTERFACE between AllWebMenus [version 5.3.940] and DRUPAL 9.1

1.     The AllWebMenus Add-in
This already exists inside my AllWebMenus installation.

2.     I cannot Install The Likno JavaScript/CSS Menus Module [allwebmenus-drupal7-menu-module.zip]
on my computer.

I uploaded the entire likno_menus folder to the modules directory.
An upload result of uploading is the message “Failed to get available update data for one project.“

callBack Ajax

I have a boolean field to update through a callBack (called from another field) but it doesn't work. The text and numeric fields work but the Boolean field does not
This is the code in form_alter

          $form['field_richiedente']['widget']['#ajax'] = [
            'event'           => 'change',
            'disable-refocus' => FALSE,
            'callback'        => 'CBRich',
          ];

#id of the boolean field
$form['field_sede']['widget']['value']['#attributes'] = ['id' => ['vis-sede']];

callback code

Commerce Stock not correct value in template

I am using best selling product template and inside I am render product with stock information. 

This 

product['#commerce_product'].variations[0].entity.field_stock.value

return me 0.000 but correct value is 3. I dont know why is this doing. Please can somebody help me with this?

Access the paragraph fields in my custom module

I have a Product content type with these fields; title, body, and one entity reference revisions(Paragraph: field_select_module).

I am creating a custom REST API(custom module) to export the fields in the JSON. I am able to print the title and body. Could someone help me to print the paragraph fields which have title and image(Media) and title and image will repeat 3 times. It should be inside this array 'product_list' => array(),

Here is my controller.

Form with fileupload.

Hello,

I have a big problem with file upload. I have a form with 3 fields. One is file field.
When I'm trying to call any function like file_save_upload() I'm always getting errors... cannot call function

How I can make it to work? 

I don't wan't to use file_managed because i want to change filename before saving and I want to store all form datat in my custom database table. Any help would be great.

It's Drupal 9.1.2

Here is my code:

Pages

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