Anyway to change the button label for file upoading?

In other words, file_field_tag, gets me a box with a button labeled
(variously) browse… or choose file… depending on the browser. Is
there any way to control that to be some other text, or where it’s
placed relative to the box?

Thanks!

Pito

Pito S. wrote:

In other words, file_field_tag, gets me a box with a button labeled
(variously) browse… or choose file… depending on the browser. Is
there any way to control that to be some other text, or where it’s
placed relative to the box?

Not to my knowledge. If you look at the HTML, you’ll see that that text
is not actually in there. It’s completely under the control of the
browser, and is no more susceptible to user control than is the precise
appearance of a checkbox.

Thanks!

Pito

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

No, and you wouldn’t want to change this anyways, even if you could.
The browser controls the language for the user. So, each command
iteration outputs the dialog into a translated piece.

If you were able to change this, you would have to supply all of the
localization for the user as well and provide output to all languages
supported by the browser.

It’s a similar issue that is present today in traditional GUI
development.

Thanks for the info, both of you. I can now stop looking for the
non-existent option :slight_smile:

In other words, file_field_tag, gets me a box with a button labeled
(variously) browse… or choose file… depending on the browser. Is
there any way to control that to be some other text, or where it’s
placed relative to the box?

You can’t. You can however overlay the entire field with a graphic
and then use some JS trickery to pass through clicks to the field
underneath. Google for something along the lines of “customize form
fields”.

Whether it’s a good idea or not is another matter.