Developer forum

Forum » Rapido » Input type=file not rendering

Input type=file not rendering

Mafalda Correa
Mafalda Correa
Reply

Hi,

I created a Form with Forms for Editors which I was using with the Form app with the template Default.cshtml. I added multiple fields and it all worked well, but when I added a File field, nothing appeared in the frontend. 

I looked at the code and realised that in the Form.cshtml template, where the output for the different fieldTypes is defined, there's no case for the fieldType File. There's also a handful other fieldTypes missing from the Form.cshtml template.

I added case "File" and the field showed in the frontend and works fine:

case "File":
    form.Add(new FileField
    {
        Id = systemName,
        Name = systemName,
        Label = label,
        HelpText = description,
        Required = required
    });
    break;

Can we have all the fields added to this so that we can have a default template for any form we want/can create?


Replies

 

You must be logged in to post in the forum