How to send in a webform a taxonomy field associated with the user who sends

Hi. I have my site with group 8 and used a form created with webform 3.
Registered users have unique association ended listed in taxonomy.
I need that when a registered user submits a form, they also submit that taxonomy termination that is associated with their account, and that obviously cannot modify that value.
I appreciate any input!

Ajax validation only works when I am connected

Hello !
I am new in Drupal world and I'm trying to use the Drupal From API to create a contact form with Ajax validation.
I'm facing an issues:

  • My following form (see below) works well but only when the user is connected as administrator. When I am not logged in as an administrator, ajax validation does not work.

Here is the form I created:

what is the new way of writing $entity->link()

Hi, 

so $entity->link() is deprecated in the latests versions of drupal 8, that means either it doesn't already work either it won't in a few months. And of course, despite spending hours looking online, I found no clear "new method" to replace it.

Does anyone has an idea  ? 

Cheers, 

'Why try making things simplier when you can make them more complicated ? '

French (joke) proverb. 

Database connection in loop memory leak

I have a function with a loop that in the loop calls a subfunction to update a database.  The subfunction use a query that connects with \Drupal::database() and everything sems to work fine.  But, when the loop ran into thousands of instances, it crashed and it turns out there is a memory leak for every \Drupal::database() you call since the memory is not released at the end of the function.

Auto create additional nodes from an add node form

My requirement is this; a training system that includes "Courses", "Days or weeks" and then content for each day or week.  My thinking is to have 3 contents types: course, day/week and then content and reference each other.  Does anyone know if it is possible on the course creation form to have a dropdown for how many days/weeks and then create those entities.  I wondered about using rules? or if anybody has any better ways of laying this out, not sure if something could be done with taxonomy?

Any help appreciated.

How to override Module's CSS in Multisite?!

How to override Module's CSS in Multisite?!

This is a pain, I once already had this problem, I had to rewrite with ! important all Modules stylesheet, and now I will have to do it much more....

In Multisite - my understanding is - all Modules, with their stylesheets are placed in Central site; and when I am changing a theme for a subsite - and I need to change Display Suite's Node layout CSS - I can't do it normally; I don't know how; if I just add css to my general stylesheet - it doesn't overwrite that Module;

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x