Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 94360

Version tags should be used for questions that apply to a version only, not to merely say what version a site is using.

1 vote
1 answer
333 views

How do I use the flood interface?

I'm working on a two-factor login form that sends a text message to the user. With a "did not recieve message" button. I would like to limit the number of times a user can request for a new text messa …
AndrewRMillar's user avatar
1 vote
1 answer
297 views

When passing a variable from a render array to JavaScript how do you reach that variable in ...

I add a variable in the backend to a render array like so (removed superfluous code): $some_var = 'Hello World'; return [ '#attached' => [ 'drupalSettings' => ['someVar' => $some_var], ], '# …
AndrewRMillar's user avatar
0 votes

When passing a variable from a render array to JavaScript how do you reach that variable in ...

When you need to use a variable in the JavaScript you have set from the backend and added to the drupalSettings, you can access that variable using the drupalSettings object like tried in the example …
AndrewRMillar's user avatar
2 votes
2 answers
2k views

How do I pass a value from PHP to JavaScript from a function that returns a render array?

customer_subscription' => $obj_customer->getSubscription(), 'subscriptions_explanation' => $arr_subscription_text, ] ]; Passing data from PHP to javascript variable available to all pages in Drupal 8
AndrewRMillar's user avatar
2 votes
1 answer
519 views

How to notify user using ->messenger() and ajax?

I would like to send a message to the user on an event in the backend without a refresh. I have a 2fa login form that will send a token text. That form has a "did not receive sms" button/link using aj …
AndrewRMillar's user avatar
0 votes
1 answer
595 views

Is there a way to change how a form button looks?

I know how to add a class to a form element and how to add a form submission button, but there are classes that are automatically added to these buttons in my Drupal 8 install. … In the sense that takes over some of the Drupal 8 automation? <button class="btn btn-outline-primary">{{from.actions.skip.something}}</button> …
AndrewRMillar's user avatar