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

Modal Form in Drupal

Hi

i have two form in custom module. i need call form two with modal form and after click save in modal form save all modal data in database.

how do this in drupal 8?

Creating a custom module. Having issues.

I am making a custom module with just a couple of routes inside of it. The module depends on the LightOpenID library, which I have included using composer, and have access to. 

I created a field on the user object (field_steam_id), and the lightopenid provides a route to forward to the steam webapi to log them into steam, which sends back the users unique steam ID. 

This value is then saved to their logged in user object via the field_steam_id and saved.

can't remove height/width from images

Hello,

i'm developing a drupal 8 site with a custom theme, when i upload images in the content  > Basic page i cant remove the height and width from the inserted image's.

i have tried:

function customtheme_preprocess_image(&$vars) {
if ($vars['style_name'] == 'IMAGE_STYLE_NAME') {
// Remove explicit width & height declaration.
unset($vars['width'], $vars['height'], $vars['attributes']['width'], $vars['attributes']['height']);
}

}

But that did not help, has somebody sugestions for me?

Change available options on entity reference field via AJAX

Hello,

I want to build a page for a sports league and I have a content type "game" that can be used to describe a game. It has the following fields with corresponding field types in brackets:

Combine like things in single module or split to multiple modules?

I need a number of custom fields for my current development, 1 of these is effectively a base field which is used on it's own in some places, but it also extended into further custom fields.

Classic design suggests lots of small modules, however, these field types are bespoke to this project so it seems logical (in my mind) to incorporate all of these into a single project_custom_fields module. I have other non-related bespoke functionality in individual modules, but it seems overkill to have a module for each field type.

What is the preferred way?

Showing Form Validation Errors inside Modal

I am using the fantastic Ajax Login module (https://www.drupal.org/project/ajaxlogin) to show my login/register/change password forms as modals which works great but I cant figure out how to make a normal modal show its validation inside the modal. In my User profile template I have the following:

Pages

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