Are you wondering how to set classes on Drupal 8+'s FAPI checkboxes / radios single options or disable one of them? Let me help you! Checkboxes and Radios Form Elements are implemented similarly in Drupals Form API (FAPI): // Checkboxes:
Snippets
Drupal Form API doesn't offer a native HTML type="reset" button known from the W3C: https://www.w3.org/TR/2012/WD-html-markup-20121025/input.reset.html So if you ever need one, this might be a good starting point in Drupal 8+: 'reset' => [
As it sadly took me some time to find out and it's not very well documented, here's how you close a Drupal 8+ dialog (in this case the Off-Canvas) using JavaScript: Drupal.dialog(document.getElementById('drupal-off-canvas')).close(); You
In the COOKiES Drupal 8+ module, we had the issue that config entity string translations were not possible with text > 128 characters length: https://www.drupal.org/project/cookies/issues/3327045 The reason for that is in core. Form API
This post saved you a lot of time and headache?
Then I'd be very happy about a delicious coffee! Or a helpful book from my wish list.