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

Viewing Users filtered by field in logged in user

We've added a field to the user (Program Id), and we're trying to filter a user view showing the users whose Program Id is the same as the logged in user.  Is there any way to do this via the  Views UI, or is this going to require programmatically creating a filter, and if the latter, how do I go about doing it?

How to show a success message via ajax callback function on form submit

Hello Friends,

This is my first time experimenting with Ajax. 

I have a form that fires a ajax callback function on submit.

In this function I would like to show a success message indicating that the form has sucessfully been submitted. Something like 

drupal_set_message(t('Form Submitted Successfully'), 'status', TRUE);

However, this does nothing.

The key parts of my form, look as follows:

Add custom (PHP) items to an existing menu

Can you please point me to an updated and verified D8 guide (supposing there is one...) explaining how to add a custom item to an existing menu?

I found this one (https://befused.com/drupal/menu-links-custom-module-d8), but after following all the steps there's no change on the menu and nothing on the Apache/FPM logs.

How to install a custom sub-profile

I created a sub-profile that is supposed to add a content type, fields for the content type, a view that lists nodes of the content type, and even a link to the view from the Admin/Configuration menu.  I have a config/install directory with the yml files for creating everything, as well as the info.yml, .install, and .profile files.

My boss created a custom distribution as a base Drupal install.  The sub-profile that I created is supposed to give that base installation a specific purpose.

Create a directory from a module

I need create a directory from a module

Custom entity > PageLayoutListBuilder > field not displayed

Hi, I created a custom entity with these fields: id, uuid, name, user_id.
I try to print the value of user_id in admin but without results.
$entity->get('user_id')->value
$entity->get('user_id')->getValue()
$entity->user_id->value

Nothing, I can't access the value, while for the other fields I have no problem.

Do you have solutions?

Pages

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