AnsweredAssumed Answered

Create custom control for upload document in create-content wizard

Question asked by 3acascia on Mar 1, 2013
Latest reply on Jan 21, 2014 by vbr
Hi All,

I'd like to upload content during creation of custom type using the standard creation form.

 
<config evaluator="model-type" condition="myprefix :mytype">
      <forms>
         <!– Document Library Common form –>
          <form>
           <field-visibility>         
           <show id="myprefix :mytype" force="true"/>            
           <show id="cm:title"/>            
             <show id="cm:content" for-mode="create"/>          
             </field-visibility>
               <appearance>
                  <field id="cm:content" mandatory="true">
                     <control template="/my-upload.ftl"/>
                  </field>
               </appearance>              
         </form>        
     </forms>
   </config>


Is is possible? Currently, my-upload.ftl is defined as follow:


            <div class="file-upload">

               <span id="${fieldHtmlId}-fileUpload-button" class="yui-button yui-push-button">

                  <span class="first-child">

                     <button name="fileUpload">${msg("button.upload")}</button>

                  </span>

               </span>

            </div>


How I can bind uploader to button named "fileUpload" in my-upload.ftl.

Thanks in advance,
Toma

Outcomes