Dewancodes·Feb 14, 2024Move file upload validation from file.module to constraint validators :To move file upload validation from file.module to constraint validators, follow these steps: Create a new file named…
Dewancodes·Feb 6, 2024Entity field validators and constraints in Drupal :Drupal’s Entity API provides a flexible and powerful system for managing entities, which are reusable pieces of content with a defined…
Dewancodes·Jan 31, 2024“Notice: Array to string conversion” when form element or field has a suffix and a Ajax callback :To fix this issue, you can modify the Ajax callback function to properly handle arrays with suffixes. Here’s an example of how to do this…
Dewancodes·Jan 31, 2024Use col-md- instead of col-sm- in page.html.twig :To switch from using the small (sm) breakpoint to the medium (md) breakpoint in Bootstrap’s grid system in page template (page*.html)…
Dewancodes·Jan 30, 2024PHP 8.0 Compatibility for boostrap theme in drupal 10 :Bootstrap is a popular front-end development framework that has been around for several years. Drupal 10, which is currently in…
Dewancodes·Jan 30, 2024W3C — make image twig output empty ALT attribute when no ALT text is provided :If you’re using Twig in Drupal and want to make sure that your image tags output an empty `alt` attribute when no `alt` text is provided…
Dewancodes·Jan 30, 2024Create @BootstrapPlugin for “bootstrap-anchor” :Here’s a basic outline of how you could create this plugin: 1. Create a new JavaScript file for your plugin. 2. Define your plugin object…
Dewancodes·Jan 29, 2024Step into the Future of Web Development with Drupal-10 Here’s What you need to Know !
Dewancodes·Jan 29, 2024Entity field validators and constraints in Drupal :Drupal’s Entity API provides a flexible and powerful system for managing entities, which are reusable pieces of content with a defined…
Dewancodes·Jan 27, 2024Display and Form pseudo fields in Drupal 9 and 10 :In Drupal 9 and 10, Display and Form pseudo fields continue to be a core feature, and here’s how you can use them: