Article

Module 2

Published: 4 Jun 2021 | Last updated 4 June 2021
1. Create a practice module named: Node Generator (node_generator).2. Create a form with class "NodeGeneratorForm" and route (/admin/generate-nodes).3. Make sure only administration role user can access this page.4. In the form, take following input from user: Content Type (A select list with all the available content types in the website. User can select only 1 content type.), Number of Nodes (Integer Field, Add a validation of minimum 2 and maximum 10. Show error accordingly.). Once the form is submitted make sure nodes are created programatically of correct content type and number which is input by user.


  • techtud official
  • @techtud
  • Senior editor at techtud

Recent Blog Posts

1. Create a module in D8 website which provides node JSON data through an endpoint.2. Alter the basic website settings form

1. Create a form with following 4 fields : Number of Nodes (Integer), Content Type (Dropdown of all content type in website), Title and Body. As soon

1. Create a practice module named: Node Generator (node_generator).2. Create a form with class "NodeGeneratorForm" and route