Is it possible to focus on a specific field in form_alter?
I saw that there is a module that does this but I would like to understand how to do it programmatically in form_alter
I am trying to redirect visitors if it is their first time on site.
I beleive in drupal 7, this could be done on itialization using init().
Im using a gated content module to check with cookies if a user has already visited the site before. But this uses JS and is executed once dom is fully loaded.
Im trying to find a way to detect at the earliest point. Before any content is load if possible.
What sort of function should I be looking at?
I know is a generic question but just looking for a starting point. Thanks
I need some help related to php. I have connected my DB with frontend web application through PHP. But I have a little bit problem with it. I want to fetch specific record from the database. Can anyone guide me how can I do it. I will appreciate your suggestions.
What's going on with the Devel module? I frequently get the following: (In this case I was executing dpm($variables); in a theme_preprocess_menu function but this happens in other situations too.)
The website encountered an unexpected error. Please try again later. Error: Class "Doctrine\Common\Util\Debug" not found in Drupal\devel\Plugin\Devel\Dumper\DoctrineDebug->export() (line 25 of modules/contrib/devel/src/Plugin/Devel/Dumper/DoctrineDebug.php).
I'm quite new in Drupal environment, sorry beforehand in case I'm asking something obviuos.
I have the scenary where I need to get some info from related entities. What I have seen so far is to construct an array of nodes id and then getting the specific fields. In some cases that is not really efficient.
Is this the only way to do it? Is there any way to "Query join entities getting field values"?.