183 questions
0
votes
1
answer
362
views
Symfony 6: embedded form Collection with File upload in child form
I have an entity ClientFileAction which is parent to an entity Attachment in OneToMany relation. Attachment holds not only file path, but also information about files, like title, upload date, etc.
...
1
vote
0
answers
574
views
Symfony 6: embedded form collection, add only new elements and omit existing elements
I have a FormType which contains an embedded collection of another FormType, all is working properly and done according to How to Embed a Collection of Forms.
My embedded FormType is an attachment ...
1
vote
0
answers
40
views
Having multiple formcollection passed through parameter in ajax call
I am doing an ajax call where I serialize two forms but when passing the data in only the 2nd forms' key and value is showing up for both parameters, is there a better way to do this or am I missing ...
0
votes
0
answers
374
views
Loop through FormCollection with index and key name to get value
I am trying to loop through a FormCollection where I want to specify the index and key of the formcollection but am not having luck.
FormCollection Keys Example
form[0][keyA]
form[0][keyB]
form[0][...
0
votes
1
answer
84
views
MVC FormCollection not showing previous submitted items
I am using FormCollection and GetValues() and I am encountering issues if I resubmit the information. I have a button that Calculates the Slope of a range of entries. When I Calculate the Slope I save ...
-1
votes
1
answer
550
views
Vich upload, multi upload images doesn't work
I'm trying to upload multi images using vich upload bundle and symfony 5 :
I created a one to many relation between User and Images :
/**
* @ORM\Entity(repositoryClass=UserRepository::class)
* @...
1
vote
1
answer
755
views
Symfony Form Builder: How to dynamically add Fields to a Poll
I created a Symfony Poll-Bundle which has the Entitys Campaign->Block->Line->Field->PollResult.
So i have a CollectionType CampaignType which consists of many blocks.
One block consist of ...
0
votes
1
answer
435
views
MVC FormCollection value parse to decimal with period seperator for decimals
This time I'm working on a small MVC application. In the update part of my model in the controller, all the field values are passed through in the controller. One of the fields is a decimal value. ...
0
votes
1
answer
73
views
Form Collection how to avoid creating duplicate record (OneToMany - ManyToOne)
The problem
I have two entities, one called Question that can be self-referencing, it has an association with QuestionSubQuestions (it was necessary to add some extra fields like filter) so it can ...
0
votes
1
answer
55
views
I need to pass multiple arrays back to the model
List<siplist> itemList = new List<siplist>();
string AUNT= form["Amount"].Trim(); result 123,1234,123
string Date = form["Date"].Trim(); result 2020-02-18,2020-02-17,2020-...
0
votes
0
answers
57
views
Using TryUpdateModel in controller for update data unable to update data Unit test case asp.net mvc
While running test case gets success but data doesn't get update in database
I was getting system null exception that is resolve by using controller context but unable to update data
**Unit test ...
1
vote
1
answer
1k
views
File Uploaded from Vue.JS UI not being captured by MVC Controller
So in my Vue component, I have the following file upload dialog.
<div class="file has-name is-right">
<label class="file-label">
<input class="file-input" type="file" v-on:change=...
0
votes
1
answer
109
views
Form collection data pass [Symfony 4]
I'm coming to you to solve a brain killer issue.
So i've a basic form to generate sub forms. I would like to pass array data to the sub form but array pass are data distorted.
I've also got an ...
0
votes
1
answer
135
views
Input returns the correct selected value to controller but select list is not
I have a conditional input or select list on my razor view. When I put the action directly on my form it works fine; but when I try to get form value and send it to my controller it doesn't pass the ...
0
votes
2
answers
2k
views
ASP .NET MVC dynamically created fields not bind to FormCollection
I created a Partial Razor view with dynamically created fields:
for (int i = 0 ; i < atr.Count; i++)
{
<div class="col-md-12 panel panel-default sx-box-shadow-on-hover">
<div ...