Non editable file_field

Hi,
I need to upload files in my application
I am using following code

<tr>
<td width="125">Upload Document:</td><td width="400"><%=
form.file_field("filename") %></td>
</tr>

But I want that the file field that gets displayed in my browser should
not be editable.
i.e user should be able to select the file through the browse click
only.

The file field is implemented browser specifically, on Safari for example, there simply isn’t an editfield you can fill in. You can’t change this behavior. The only way it might possibly work is if you place a

input field and make sure the clicks don’t fall through (either using onclick=“return false;” on the div or using unobtrusive javascript to do so). That said, make sure you check and adjust the placement of the
in all browsers and don’t show it on Safari.

Best regards

Peter De Berdt

Peter De Berdt wrote: