Page 1 of 1

Attachment control

Posted: 15 Aug 2017
by jennifer.eckard
I was able to add an attachment control via this link. http://forum.spform.com/forms-designer ... n-10088/.
However when the item is viewed on an iphone the chose file is really small and I cant target just the button. This form is specifically for mobile and the majority of users are iphone so I really need to make this bigger. Does anyone have a suggestion?
cleanform.PNG
cleanform.PNG (76.36 KiB) Viewed 2883 times

Re: Attachment control

Posted: 16 Aug 2017
by Nikita Kurguzov
Hello, Jennifer!
Sadly, this particular button is very hard to style using CSS. It's caused by the fact, that it is actually an <input type="file"> and very few browsers can actually style it at all. It can be styled in Chrome, Safari, Internet Explorer and possibly Microsoft Edge, though I am not 100% certain about the latter.

For example, in Google Chrome and Safari this CSS code added inside CSS editor should increase the size of the button:

Code: Select all

::-webkit-file-upload-button {
  padding: 1em;
}
Internet Explorer should use this code instead:

Code: Select all

::-ms-browse {
  padding: 1em;
}
As for mobile browsers, it really depends on the browser. This functionality comes from WebKit
(Chrome, Safari) and Trident (IE) layout engines.