SwatFileEntry Demo

Valid file types are: image/gif, image/jpeg, image/png.

SwatML for this demo:


<?xml version="1.0" standalone="no"?>
<!DOCTYPE swatml SYSTEM "http://swat.silverorange.com/swatml1.dtd">
<swatml>
  <widget class="SwatForm" id="my_form">
    <property name="action">index.php?demo=FileEntry</property>

    <widget class="SwatFormField">
      <property name="title" type="string">Entry</property>
      <widget class="SwatFileEntry" id="file_entry">
        <property name="accept_mime_types[]">image/gif</property>
        <property name="accept_mime_types[]">image/jpeg</property>
        <property name="accept_mime_types[]">image/png</property>

        <property name="required" type="boolean">true</property>
      </widget>
    </widget>

    <widget class="SwatFooterFormField">
      <widget class="SwatButton">
        <property name="title" type="string">Upload</property>
      </widget>
    </widget>
  </widget>
</swatml>