Skip Navigation

[Resolved] Change "Select File" input field

This support ticket is created 5 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 2 replies, has 2 voices.

Last updated by temel-tecnicas-deM 5 years, 10 months ago.

Assisted by: Nigel.

Author
Posts
#1212544

I am trying to change the name the name of the button "Select File", I want that the button says "Adjunto" instead of "Selec File" and also i want to hide "No File Selected" text.

#1212580

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

The Types file field simply inserts an HTML input element of type="file", and the text that you see is the text which the browser chooses to display.

If you visit this page in a browser that has English language settings you will see the text in English. If you visit it in a browser with Spanish language settings you will see it in Spanish: hidden link

It is possible to customise by adding a label element to the form where the for attribute points to the id attribute of the file input (which you can check using your browser dev tools).

You could then hide the input element itself and rely on the label which you add with your chosen text (and you could customise that to look like a button, or similar).

Here is a sample guide to doing that:
hidden link

#1212977

My issue is resolved now. Thank you!