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

Custom submit handler on user_profile_form

HI,

In a module I use an hook to alter the user_profile_form.

function justtosay_formTools_form_alter(&$form, &$form_state, $form_id) {    

   dpm($form_id );
   
  if($form_id == 'user_profile_form') {
     //redirigé l'utilisateur après submit
    $form['actions']['submit']['#submit'][] = 'overrided_submit_user_handler';

}

here is the custom submit function :

Sharing content from one Drupal 8 site to another

Wondering if anyone knows of the best way to share content from one site to another. We've tried the feeds module previously but had some issues. I see that there has recently been a new release so we will probably try again. 

Clear menu cache after enabled a custom module

Hi!

I have written a small module that defines a menu item using hook_menu. The code is bellow:

Add CSS and JS to render array in custom controller

I'm rendering a page in a module with a custom controller like this:

Is dependency injection not allowed for ajax form drupal 8

I have injected both email validator and entity type manager in my drupal 8 ajax form. I get the error as below on submit. Do I have to remove dependency injection for ajax forms

ResponseText: TypeError: Argument 1 passed to Drupal\Core\Entity\EntityStorageBase::create() must be of the type array, null given,

D7 image filenames - simple query

Simple query hopefully, but I'm completely flummoxed.

I've got a site which loads images from external locations and caches them locally (using imagecache_external).  Somehow in that process it changes the filename of the image from "samplefile.jpg" to something like "9c811dbd8564a2ff551b00a3f74ca503.jpg?itok=FZzLR3QD".

Pages

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