Inject embedded social media follow link buttons or signup forms into node content between paragraphs Drupal 8 9 10
- drupal 9 add token for nodes
https://www.drupal.org/project/token_filter
References that were not needed but look good for similar stuff
https://kevinquillen.com/creating-custom-token-drupal-8
https://codimth.com/blog/web/drupal/how-create-custom-token-drupal-8-9
- drupal 8 form add hash fragment to submit path
Because we always want to go to the same place on the page when using the mini form, that is, this destination does not have to be dynamic, this works great:
$form['#action'] = "#snapshot-mini-form";
This sends the reader back to where they were in article—the form—after submit.
-
drupal 8 send hidden form element value same as options array
-
hidden form element value same as checkboxes element
-
php make array keys same as values
$this->newsletters = array_combine($newsletters, $newsletters);