Webform Select Element Optgroup / hierarchy

Webform Select Element Optgroup / hierarchy

Hello fellow Drupal users, I have created an advanced HTML element in my webform. When the form is submitted the advanced html element reverts back to the default setting, which in this case is option A1. The users selection and data for this element is not in the... read more
Webform Select Element Optgroup / hierarchy

"File not found error" when installing using composer

I’m running Docker on Ubuntu 18 with a container for MariaDB, Nginx and php-fpm (7.3). The PHP container has composer installed, and I used it to create a Drupal Commerce project. I can start the Drupal install process using a browser, but after I input the DB... read more
Webform Select Element Optgroup / hierarchy

Using OAuth2 on non-REST endpoints

I have a custom module which includes a ControllerBase. The controller has a content() function that returns a JsonResponse(). The code for this function returns a complete list of a certain entity type. I’ve tried using REST for this, but the entity structure... read more
Webform Select Element Optgroup / hierarchy

Unable to run update.php or update modules from web interface

I would really like to be able to install module updates through the web interface or run update.php when needed without changing settings.php, but something seems to be broken in my setup because it tells me I am not authorized to do so when I try. In all attempts to... read more
Webform Select Element Optgroup / hierarchy

Automatically Generate PDF from Webform Submission

First off, this is under Drupal 7. I’m looking to have the server save a PDF of the submitted webform when a user submits it or updates it (overwriting the old one on update). So far I’ve had no success with fill2pdf, views pdf, or entity print modules in... read more
Webform Select Element Optgroup / hierarchy

Patch method sample code REST API

I am working on web services in drupal. I have created a sample module for get method to expose the data using web services. I have not found any sample code for the patch method. code for get method: namespace Drupaldemo_rest_apiPluginrestresource; use... read more
Webform Select Element Optgroup / hierarchy

import address data from CSV

I migrate my content from an old D7 site to D8 site. All went well, except the addresses from field address where not migrated to the new address field. Then I use feeds, feeds_migrate, content-import… Nothing work for this. Then finaly start learning how to do... read more
Webform Select Element Optgroup / hierarchy

Define a normalizer just for a specific use case

I try to create a custom API with custom endpoints where API users can receive entity data from our page. We want to have flat arrays for most of the fields and some additional custom data added so I tried to implement some custom normalizer classes. I found out that... read more
Add Button to Node View

Add Button to Node View

I want to add custom button on node page. I tried with hook_node_view but it didn’t show up. like this: function mymodule_node_view(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display, $view_mode) { $build[‘mybutton’] = [... read more
Webform Select Element Optgroup / hierarchy

Call to a member function access() on null in …BlockAccessControlHandler.php

I am getting two errors on my local Drupal 8 site. First error: “The website encountered an unexpected error. Please try again later.” Second error: “Fatal error: Call to a member function access() on a non-object in... read more
Webform Select Element Optgroup / hierarchy

How do I instantiate a custom class with dependency injection?

I am relatively fresh to the DI party and am struggling to get my head around how exactly to use Dependency Injection. I understand that I can pass requirements as part of a service, but what about in my own class? Say I have the below class where I want the language... read more