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

Can I use hook_form _alter to limit the results returned to a reference field?

Hi Guys

I have a views entity reference field that will only be displayed on the node edit form and I want to add an argument to it dynamically to restrict the returned results based on my argument.

My question was can this be done through the hook_form_alter?

----------------------- 

I have now figured out a way to do this and thought I would share in case others are struggling with the same thing.

in my hook_form_alter I used the following:

custom module to alter views output

Hello everybody,

I am trying to create a drupal 8 custom module to alter views output field by adding new option to drop button. As I new to drupal 8 , I would like to know the flow of execution of after creating the  custom module. what all files required for that. 

I have created following files my_module.info.yml, my_module.module. Does this two files only needed to alter the views output.

Please help me.  

CRON issues with Date iCal 7.x-3.9

Hi there,

This module appears not to be updating ical feeds on every cron run... but it was working in the past. 

I have set up cron to run every hour. The feed imports the calendar events to a content type. I have also tried to manually run cron using drush but the timestamp on import still says 3 months ago. No errors have been reported with the cron run. The twitter feeds download fine on every run but ical is not working.

Thanks for any help or suggestions. Is there something that I'm missing?

- Vibha.

How to set up a timeline (message) on the Drupal homepage ?

I have a site with Drupal 8 and modules Flag and Message modules.

When a user creates a node, this creates a message.

I created a view for my home page that displays messages. I also created a "read" or "unread" flag to mark messages. By default, a new message is marked as "unread".

The logo of my site is present on all the pages and it even on the homepage.

I want to add the class .timeline-notification to my logo if the following conditions are applied:

How to flag a page when viewed ?

I have Drupal 8 and Flag module.

I created a flag on the user. How to flag the user's account page when I visit it ?

Deferred Image Code Not Registering With PageSpeed Insights

We were having issues implementing lazy-loading on our D7 website. After a few failed attempts we discovered another method that we were able to implement. 

In real world testing it appears to our eyes to defer the image loading. However, Google's PageSpeed Insights does not credit us with having deferred images. Here is a run test: (I had to remove the link in order to pass the SPAM filter)

Here is the img src we implemented (we altered the original white pixel and turned it gray b/c it helped us spot images in our TinyMCE editor rather than look at blanks):

Pages

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