MvcFileUploader icon indicating copy to clipboard operation
MvcFileUploader copied to clipboard

Dynamically adding the form fields in the html helper

Open JasonHaines opened this issue 10 years ago • 1 comments

We are using the MVCUploader in one of our projects. The project includes files and form data. Our problem is the form data fields can vary from upload to upload. Is there a way in the html helper to dynamically load the .AddFormFields

Html.MvcFileUpload() .UploadAt(Url.Action("UploadFile")) .UIStyle(ui) .MaxNumberOfFiles(maxFilesThatCanBeUploaded) .WithMaxFileSize(5000000) ... Produce this N number of times based on business logic .AddFormField("Name", "Fred")

    .RenderInline("_MvcFileupload")

JasonHaines avatar May 07 '15 15:05 JasonHaines

Hi, I have the same issue, I just want to be able to loop form data as per the original post. Is there any update on a solution for this? Thanks Louise

grovesy69 avatar May 27 '15 15:05 grovesy69