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

Ajax Form Callback deletes all properties

Hi,

I have a form for a single dropdown select that uses a callback on change to update some elements on the page and make a few calls to an API, to update values in the API. Here's the code:

Exposed filter on a view ignores Vocab ordering (taxonomy list)

Hi

I have an exposed filter (dropdown) on a Drupal7 view displaying terms from a taxonomy list.
The dropdown is ordering alphabetically even though the taxonomy list is ordered by weight.

I've tried everything. Arrrghhh!

Can the order be set programmatically using form_alter or some other way?

https://www.dropbox.com/sh/la8w6ydw3886tyw/AAArerMbYs6TYPiurQcb3xBMa?dl=0

Inserting script from views value

I have some ads that use <script></script>  that i get from a view and need to insert into a page.  I made a view JSON export and tried to import them in the template with javascript, but looks like that is too late in the process.  So, I instead added a views block that I imported in a custom twig template.  The problem is that views surrounds the <script></script> in quoutes, so intstead of processing the script it just show the full script.  I have tried to use | render | trim in twig to remove the outer quotes, but no success and I feel this is not the right solu

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?

Pages

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