Drupal Answers Community Digest

Top new questions this week:

How do I retain user input in a form after submission?

I am working on a simple form for searching a collection of marriage licenses. It consists of a select box where the user may choose to search last names, first names, or both, and a text field where ...

8 forms  
asked by Will Martin 4 votes
answered by stevekeiretsu 5 votes

Broken live site after upgrade although upgrading locally and stage was no problem

I have just upgraded a site from Drupal 8.7 to 8.8, and I now have a broken site. Pages on the site (mainly admin pages) are now giving the following error: ...

8 updating  
asked by Spudley 2 votes

How can I keep logs of all outgoing emails?

I am using SMTP Authentication Support module to send emails with drupal 8.When I see watcdog mail-log from admin it shows only emails sent for registration or password reset, that is also with single ...

8 emails log-messages  
asked by softech 1 vote

How to get node title using this query on template?

Im building a custom filter in Drupal 8 based on some queries. I got this already, here im filtering by values on body: $query = db_select('node__body', 'n') ...

theming modal-dialogs  
asked by lucasvm1980 1 vote
answered by beltouche 2 votes

How can I get field labels from submission data?

I have created a custom webform handler by extending WebformHandlerBase. And I can get the data from the WebformSubmission. However, I can only get the machine name of the field. I would like to get ...

8 webforms  
asked by xpersonas 1 vote
answered by Patrick Star 0 votes

Cookie Compliance and Google Analytics

I'm using Drupal 8.6.14 (going to upgrade soon) and i am trying to create a cookie consent page that actually works! I've used many different modules like EU Cookies Compliance, GDPR Compliance and ...

8 cookies  
asked by b10z 1 vote
answered by hotwebmatter 4 votes

How do I programmatically translate a webform?

Is it possible to add translation for webform programatically in Drupal 8. We have a webform with more than 100 questions and radio options. It is very difficult to manually add translation each time ...

8 webforms i18n-l10n  
asked by Sumith Babu 1 vote

Greatest hits from previous weeks:

What are all the directories for in the new Drupal 8 structure?

Drupal 8 re-arranged all the directories and locations of modules/themes etc. Where do things go now?

8  
asked by Letharion 52 votes
answered by Letharion 77 votes

Drush command not found after Drush completely installed

I installed Drush 8 with composer. composer require drush/drush:~8 Unfortunately, error drush command not found after Drush completely installed. Why's the drush command can't be use? ...

drush  
asked by JJ12345 11 votes
answered by greg_1_anderson 19 votes

Dynamic select list in the form (dependent dropdown)

I'm using Drupal seven. I want to make the options in a select list be dependent on the value chosen in another select list in a form. I'm sure this has been asked many times before, but I am having ...

7 ajax forms  
asked by Ben 29 votes
answered by jordojuice 27 votes

How to hide Input Format Options and help text under a textarea?

How to hide Input Format Options and help text under a textarea when adding|editing a node?

7 wysiwyg input-formats  
asked by Cosmodrom 32 votes
answered by BWPanda 26 votes

How to get the valid URL of a Link field from within a Twig template?

I have a Link field named field_my_link (machine name). Within a Twig template I can get the link's URL value with this: {{ node.field_my_link.uri }} If inside the Link's URL there is an external ...

theming 8 uri navigation  
asked by Andrea 33 votes
answered by 4k4 42 votes

Programmatically create a user and assign a role

I'm programmatically creating a user with the following code. $newUser = array( 'name' => $mail, 'pass' => 'password', // note: do not md5 the password 'mail' => $mail, 'status' ...

7 users  
asked by Nicola Peluchetti 46 votes
answered by Nebojsa 46 votes

How can I import the configuration on a different site?

I have this error when I try to import the config of an another site: The staged configuration cannot be imported, because it originates from a different site than this site. You can only ...

8 configuration-management  
asked by Axel Briche 51 votes
answered by Gucho Ca 62 votes

Can you answer these questions?

Multi-step webform hooks

I have built a multi-step webform which has some field on first page (checkboxes, selectboxes etc.). I tried to access $form_state on second page in MYTHEME_form_alter where is checked if ...

8 hooks webforms  
asked by Patrick Star 1 vote

Views field cache tags does not invalidate the views cache

I've implemented CacheableDependencyInterface on my ViewsField plugin. /** * {@inheritdoc} */ public function getCacheTags() { return ['arbitrary_tag']; } I can see the tag on the ...

views 8  
asked by johndevman 1 vote
answered by 4k4 0 votes
You're receiving this message because you subscribed to the Drupal Answers community digest.
Unsubscribe from this community digest       Edit email settings       Leave feedback       Privacy
Stack Overflow

Stack Overflow, 110 William Street, 28th floor, New York, NY 10038

<3