How to hide a type of content field based on a field of the logged in user?

Hello everyone,

I'm using the views module to show a table with different activities that have different prices. My problem is that I need to show only one of the prices based on one of the current user's field. Does anyone know how I could achieve this? Would I need to use something other then views?

Thanks!

How to put the group identifier in TWIG ?

Hi, I need to integrate the group identifier into my template. I tested with this code, but it doesn't work. It breaks the page :

https://www.drupal.org/project/group

group.id.value()

However if I print the code below, it returns the group ID :

{{ group.id.value }}

Here is the complete template :

group--personnel--frontpage-tasks.html.twig

Webform Checkbox Other - Checkboxes doesn't repaint after validation

Hello all,

Does anyone know is there is a know fix for this? I haven't been able to find any answer...

Situation:

I have a web form that have a few "Check box other" on the form. The fields are mark as require, so they will require at least one box checked in order to submit the form.

The validation check works and a red box and message will be around the "Check box other" component.

When using Feeds, how to create new records when title name is not unique

I have an entry type called race-entry
When using the standard UI
Create a new race-entry with title race1 and save. The URL ends /race-entry/node1
Create a new race-entry with title race1 and save. The URL ends /race-entry/node2

And so on, this behavior is fine, and I’d like to achieve the same when importing data with the feeds module.

How do I add 'beforesend' code to an ajax call

I have an ajax form which works well.  It uses the ajax below to make the submit button update the form:

          '#ajax'       =>
            [
            'callback' => '::ajax_callback',
            'wrapper'  => 'my-container',
            ],

How do I add 'beforesend' functionality to this definition if for example, I want to update the background color of the submit button before the ajax call is sent?

Thanks.

Define a 'beforesend' for an ajax call

I have a very simple form.  The submit button make as ajax call defined below to update the form.  All works good.

          '#ajax'       =>
            [
            'callback' => '::ajax_callback',
            'wrapper'  => 'my-container',
            ],

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x