How to image upload in flexform of typo3 6.2 version + Drag n drop image functionality in flexform of typo3 6.2


Its very useful functionality for upload all images from system directory [sys_file]

Drag n drop image functionality also available in flexform of typo3 6.2

Following should do the trick.

<images>
  <TCEforms>
    <label>Add images</label>
    <config>
      <type>inline</type>
      <appearance type="array">
        <createNewRelationLinkTitle>Choose image from system directory.</createNewRelationLinkTitle>
        <enabledControls type="array">
          <delete>1</delete>
          <dragdrop>1</dragdrop>
          <hide>1</hide>
          <info>1</info>
          <localize>1</localize>
        </enabledControls>
        <headerThumbnail type="array">
          <field>uid_local</field>
          <height>45c</height>
          <width>45</width>
        </headerThumbnail>
        <useSortable>1</useSortable>
      </appearance>
      <behaviour type="array">
        <localizationMode>select</localizationMode>
        <localizeChildrenAtParentLocalization>1</localizeChildrenAtParentLocalization>
      </behaviour>
      <filter type="array" />
      <foreign_field>uid_foreign</foreign_field>
      <foreign_label>uid_local</foreign_label>
      <foreign_match_fields type="array">
        <fieldname>rgsmoothgallery</fieldname>
      </foreign_match_fields>
      <foreign_selector>uid_local</foreign_selector>
      <foreign_selector_fieldTcaOverride type="array">
        <config type="array">
          <appearance type="array">
            <elementBrowserAllowed>gif,jpg,jpeg,tif,tiff,bmp,pcx,tga,png,pdf,ai</elementBrowserAllowed>
            <elementBrowserType>file</elementBrowserType>
          </appearance>
        </config>
      </foreign_selector_fieldTcaOverride>
      <foreign_sortby>sorting_foreign</foreign_sortby>
      <foreign_table>sys_file_reference</foreign_table>
      <foreign_table_field>tablenames</foreign_table_field>
      <maxitems>100</maxitems>
      <minitems>0</minitems>
    </config>
  </TCEforms>
</images>

it will look like below image.

Flexform + image + typo3 6.2

Flexform + image + typo3 6.2

If you have any queries, please do not hesitate to contact me at Jainish Senjaliya

Advertisements

How to add blank value in the starting of the selection box of flexform


You can add a blank value in the beginning of the selection box (flexform).

Add below code in flexform for add blank value in the starting of the selection box.

<items type="array">
   <numIndex index="100">
   <numIndex index="0">==== Select ==== </numIndex>
      <numIndex index="1">0</numIndex>
   </numIndex>
</items>

For Selection box in flexform

<companyList>
  <TCEforms>
    <label>
      LLL:EXT:EXTENSION_NAME/flex-label.xml:
      EXTENSION_NAME.select_category
    </label>
  <config>
    <type>select</type>
      <foreign_table>TABLE_NAME</foreign_table>
      <foreign_table_where> 
          AND TABLE_NAME.deleted=0 AND TABLE_NAME.hidden=0 
          ORDER BY  TABLE_NAME.uid
      </foreign_table_where>
      <size>10</size>
      <autoSizeMax>10</autoSizeMax>
      <minitems>0</minitems>
      <maxitems>1</maxitems>
      <items type="array">
          <numIndex index="100">
               <numIndex index="0">==== Select ==== </numIndex>
               <numIndex index="1">0</numIndex>
          </numIndex>
      </items>
      <show_thumbs>1</show_thumbs>
      <allowNonIdValues>1</allowNonIdValues>
  </config>
  </TCEforms>
</companyList>

If you have any query then feel free to contact me at Jainish Senjaliya