简体   繁体   中英

How to change value of button in laravel

{{ Form::open(array('' => 'menu/profile', 'files' => true)) }}
{{ Form::file('image') }}

{{ Form::submit('Save changes') }}
{{ Form::close() }}

{{ Form::file('image') }} 

This gives me button with value=browse. Can i change that to for example upload, and also near that button is "no file selected". Can i hide that somehow?

This is not laravel related, but browser specific. it will say "browse" in IE and FireFox, but "choose file" in Chrome.

There are some workarounds for it, but its better to not change browser defaults. However if you still want to change the file input check here

its not larval MVC issue.

but yes you can fix this issue using below Possible Solutions:

hack

input[type='file'] {
  opacity:0    
}

or

set width / height

input[type="file"]{
    opacity:0;
    height:48px;
    width:48px;
}

or just play with width

input[type='file'] {
  width: 95px;
 }

Tested on Chrome 20, Safari 5.1.7 and IE 9.

or Make it transparent

input[type='file'] {
  color: transparent;
}

<input type='file'/>

example enter link description here

See link :

http://geniuscarrier.com/how-to-style-a-html-file-upload-button-in-pure-css/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM