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

Problem to access User Object after loading Users by a list of mails

Hi Guys, I'm developing a module for live event (just for the context).For subscribers, I need to assign them in a role. 

I need to develop an administration tools to assign a specific role to a list of users. 

My schedule and problem is : 

I have a list of email to copy/paste
I choose the Role
I submit

In my process code : 
I load a user by mail
If exist -> Assign the specific role to the user
If don't, I send an email to the person to ask him create an account on the website (not implemented yet)

Delete an Item in the Text List

I have a text list field with these elements
E | Exam
R | Review
T | Technique
I need to delete the line
R | Review
but the system replies that it is used in the Database and it is not possible to delete it.
Is there a way to do this?
I also need to change the Movement Type from R to T
I thought of Filtering the movements with getStorage and then with foreach modify the data

How to edit add/node fields

I have 37 fields that I need to have visitors be able to fill out. (lab test results) I can't find information on how to format that node in a way where it isn't a giant laundry list of entry points. I'd love to get them setup in a table or even a grid for the data entry to match up with what the lab results look like.

Very new to Drupal but getting the hang of it pretty fast.

Thanks in advance for any help you can give me.

a Hook dor statistics counter to show counter anywhare on content

Hi dear

I use the statistics counter module in D8

This module does not display the number of views where I want and I want to customize the number of views in page

I needed a hook to put this {{ pageveiws }} wherever I wanted

thank u

Get route url in the JS file

I want to get route url in the JS file where I am writing an ajax function

My JS file is

Cannot add javascript to my module twig template

Hello I cannot add javascript to my twig file

My libraries.yml file

register-form:
  version: 1.x
  js: js/register-form.js
  dependencies:
    - core/jquery
    - core/drupal
    - core/jquery.once

donetyping:
  version: 1.x
  js:
    js/donetyping.js: {}
    dependencies: 
      - core/jquery
      - core/jquery.once

My register-form.js  in js folder of my module:

Pages

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