Ruby on Rails: file_field, how do I remove the upload button?
问题 Cause I have a custom styled / positioned button. Currently, our set up is: Special upload button (Fancy) Hide the file_field in a div, cause the button can't be moved to be separate from the text. But we still want the text saying what file you've selected 回答1: Use CSS opacity to make the file field invisible, but still clickable. Also make the file field absolute positioned, and use a z-index to display it above a target button for the user the click. You can reference the file name via