FileBox

Extend from $.fn.textbox.defaults. Override defaults with $.fn.filebox.defaults.

The filebox component represents a file field of the forms. It extends from textbox, many properties, events and methods are inherited from textbox. But due to the security issue of the browsers, some methods such as 'setValue' can not be used on the filebox component.

Dependencies

  • textbox

Usage

Create filebox from markup.

Create filebox by using javascript.

Properties

The properties extend from textbox, below is the added or overridden properties for filebox.

Name Type Description Default
buttonText string The displaying text of button that attached to the textbox. Choose File
buttonIcon string The displaying icon of button that attached to the textbox. null
buttonAlign string Position of the button. Possible values are 'left','right'. right
accept string Specifies the types of files that the server accepts.

Code example:

$('#file').filebox({
	accept: 'image/*'
});
multiple boolean Defines if to accept multiple files. false
separator string The separator char between multiple file names. ,

Events

The events extend from textbox.

Methods

The methods extend from textbox.