How to render Form from a db table and POST into another db table in Symfony 5
I have tables as below:Table: data_set id name 1 set1Table: data_set_options id data_set_id column_name column_type position1 1 color text 1Table: product id name 1 product Table: product_optionid...
View ArticleUserPasswordEncoderInterface Autowiring Not Working Symfony 4.4
I have a super basic API endpoint with a fresh install of symfony 4.4 and I'm getting the following error:Cannot autowire argument $passwordEncoder...
View ArticleExport Object to XML file and save in folder with Symfony 5 in a AJAX call
I work with symfony 5 and have a page with Member details. I now want to be able to export the address data from the Member. For that I have a button on the page which calls a function in my Controller...
View ArticleGenerateUrl does not respect Localized Routes in Symfony4.4
IntroductionI am using: Symfony v4.4.13 on Windows 10 Pro host (development machine).In my project i am writing search module.I have set Localized Routes: en/ruRequirementI want to switch locale from...
View ArticleUploads in symfony4
I would like to know the best practices for uploading sensitive documents. To date, my documents are saved in the folder: Public / uploads / passport.Is it secure or should they be saved in another...
View ArticleIndividual column search in table with Symfony and Omines bundle
There is a question about searching by columns in a table. I use Symfony 4 and Omines bundle.I want to do a individual column search, but it doesn't work. More precisely, it works on the full...
View ArticleSending "Server Params" through Postman :
Thanks to Symfony HttpFoundation component , we can retrieve the server params like the following script : // retrieves SERVER variables $request->server->get('HTTP_HOST')So, i have the following...
View ArticleCustom relation table Symfony 4 and Doctrine
I need help to solve some task about Doctrine Relation Table.I have two entities:PropertyGroupIDNamePropertyIDNameThis entities have a custom Many To Many relation table with extra...
View ArticleUse Action class instead of Controller in Symfony
I am adherent of Action Class approach using instead of Controller. The explanation is very simple: very often Controller includes many actions, when following the Dependency Injection principle we...
View ArticleWhy my symfony captcha always return valid?
I followed this tutorial to add a captcha to my form.First I install it usingcomposer require captcha-com/symfony-captcha-bundle:"4.*"After I Install it, I got an error on a file called...
View ArticleExport Object to XML file and and force file download with Symfony 5 in a...
I work with symfony 5 and have a page with Member details. I now want to be able to export the address data from the Member. For that I have a button on the page which calls a function in my Controller...
View ArticleMy profiler toolbar isn't showing up in symfony 4.3.1
In my .env file, I have specified my app environment to be dev and debug to be true like so:APP_ENV=devAPP_DEBUG=trueIn my config/packages/dev/web_profiler.yaml file I have the following:web_profiler:...
View ArticleSymfony 4 serialize entity wihout relations
I've have to log changes of each entities. I've Listener which listen for doctrine's events on preRemove, postUpdate and postDelete.My enity AccessModule has relations:App\Entity\AccessModule.php/** *...
View ArticleSymfony 4: Conflict between two firewalls
I currently have two login systems on my Symfony (4.4) application.Separately (when I comment on one of the two associated firewalls), the two forms work well. But when they are together, the second...
View ArticleApiPltaform - GraphQL Issue - Null value in DatetimeType field throw...
API Platform version(s) affected: v2.5.7 (symfony v4.4.13 on PHP 7.4)DescriptionI have an Entity with a field typed with a custom type.It works great if the field isn't null.If there is an item with a...
View ArticleWant to create a query to get all questions for each test
I have a problem to get some data : I'm using Symfony version 4.19.0Ihave 2 entities : Question and TestTechnique--> I have a ManyToOne relation, a question is onnected by one and only one...
View ArticleHow can I customize form fields IDs in Symfony 4?
I'm building a web page in Symfony that is built with multiple instances of the same form, but with different POST urls. I want to intercept the submit with javascript, and do a simple AJAX POST.The...
View ArticleSymfony $form->getData() return empty Object with values concatenated
This is my controller/** * @Route("/offre/add", name="offre_add") * @param Request $request * @return RedirectResponse|Response * @throws \Exception */public function addOffre(Request $request) {...
View Articlehow to select an element inside FormType symfony?
this works fine $(document).ready(function () { $('#banner_description').on('keyup', function () { alert( this.value ); }) });and when i need to catch the change event when i do upload images its...
View ArticleWant to create a query to get all questions for each test
I have a problem to get some data : I'm using Symfony version 4.19.0Ihave 2 entities : Question and TestTechnique--> I have a ManyToOne relation, a question is onnected by one and only one...
View Article