I want to create two modules for two forms. How can I achieve that? Namespace of both file will get conflict or not?
I am trying for this, and getting one error don't know its because of the two form or not.
Folder structure1:
modules->custom->amazing_forms
->amazing_forms.info.yml
->amazing_forms.routing.yml
->src
->Formss
->ContributeForm.php
Folder Structure2
modules->resume
->resume.info.yml
->resume.routing.yml
->src
->Form
->ResumeForm.php
Error:
InvalidArgumentException: Class "\Drupal\amazing_forms\Formss\ContriForm" does not exist. in Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition() (line 29 of C:\xampp\htdocs\drupal8\core\lib\Drupal\Core\DependencyInjection\ClassResolver.php).
I have a question: Controller name should be Form
only or we can use any other name for other modules as I have used above?
src/Form
.ContriForm does not exist
is a legitimate error because it doesn't exist, it should beContributeForm
.