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

Autowire for ContainerInjectionInterface possible ?

I'd like to apply the same autowire mechanism used for services to classes implementing ContainerInjectionInterface (ex: forms), to reduce boilerplate code.
For example I have currently:

hook_form_user_register_form_alter

The following is not working: (The description and javascript is working)

function bncreports_form_user_register_form_alter(&$form, FormStateInterface $form_state, $form_id)
{
  $form['account']['name']['#description'] = 'Use Email address as your username';
  $form['account']['name']['#attributes'] = ['onblur' => 'this.value=this.value.toLowerCase();'];
  $form['field_district']['#required'] = true;
  dump($form);
}

The field_district filed is not required when it should be. 

How to do crud operation in drupal 9 in web form without using coding

Is it possible to do crud operation in drupal without coding and using no php,,ie by using any extra modules.is it possiblle...If possible please give me extra resources

help me to convert mysql query to dynamic query

SET @sql = NULL;
SELECT
  GROUP_CONCAT(DISTINCT
    CONCAT(
      'ifnull(SUM(case when name = ''',
      name,
      ''' then donations end),null) AS `',
      name, '`'
    )
  ) INTO @sql
FROM
  mytable2;
SET @sql = CONCAT('SELECT date, ', @sql, '
                  FROM mytable2
                   GROUP BY date');

PREPARE stmt1 FROM @sql;
EXECUTE stmt1;
DEALLOCATE PREPARE stmt1;

String Override Module Gives an Unexpected Error Message on Drupal 8

Hi,

Strng Override Module ( Drupal 8) gives an "Unexpected Error " message when uploading string changes..

I can't troubleshoot. I am blind.

Any help is appreciated.

Kind Regards,

Korkut

How to run Shrinktheweb module on drupal 8

Hi,

I have downloaded the shrinktheweb module on Drupal 8. Enabled the module, set the acces and sequrity keys and adjusted configuration. However, I can't find any direct information beyond that on how to run it on drupal. Copying and pasting a sample code somewhere ?. is not a direction.

I have already upgraded my Shrinktheweb account. However, I can't send support tickets to Shrinkthewrb.

Please help,

Regards,

Korkut Vats

Pages

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