customise character count/size limit in text box at the create and edit forms

cancel
Showing results for 
Search instead for 
Did you mean: 
alf_developer09
Active Member II

customise character count/size limit in text box at the create and edit forms

<config evaluator="node-type" condition="acme:document">           <forms>             <form>               <field-visibility>                  <show id="acme:anycustomproperty"/>                </field-visibility>                <appearance>                <field id="acme:anycustomproperty" label-id="xqw">                    <control template='/org/alfresco/components/form/controls/textfield.ftl' />                <control-param name='size'>5000</control-param>            <control template='/org/alfresco/components/form/controls/textarea.ftl' />                <control-param name='rows'>10</control-param>                 <control-param name='columns'>10</control-param>                </field>                </appearance>             </form>           </forms>         </config>
4 Replies
afaust
Master

Re: customise character count/size limit in text box at the create and edit forms

Is there a question that you wanted to ask but failed to include here?

alf_developer09
Active Member II

Re: customise character count/size limit in text box at the create and edit forms

Hi Axel,thanks,yes I tried to but not getting pasted with readable format, I used the code snippet(attached) but not showing up desired results. I need to maximise chacter limit to 5k on create and edit page

 
afaust
Master

Re: customise character count/size limit in text box at the create and edit forms

It certainly would be appreciated if you would spent the least amount of effort possible to describe the "desired" result, e.g. if you only want the restriction in the UI or you also want it to be validated / in the model. Instead of just saying "it doesn't work" maybe explain what else you have tried so far, what you may have seen in the logs or in terms of other behaviour. E.g. in your example it would be interesting to know if the field itself is even being displayed.

One thing that is obiously broken is your XML structure. Your control-param elements are not nested inside the control elements as they should,.

<config evaluator="node-type" condition="acme:document">
   <forms>
      <form>
         <field-visibility>
            <show id="acme:anycustomproperty"/>
         </field-visibility>
         <appearance>
            <field id="acme:anycustomproperty" label-id="xqw">
               <control template='/org/alfresco/components/form/controls/textfield.ftl'>
                  <control-param name='size'>5000</control-param>
               </control>
               <control template='/org/alfresco/components/form/controls/textarea.ftl'>
                  <control-param name='rows'>10</control-param>
                  <control-param name='columns'>10</control-param>
               </control>
            </field>
         </appearance>
      </form>
   </forms>
</config>
alf_developer09
Active Member II

Re: customise character count/size limit in text box at the create and edit forms

yes Axel with that configuration,even size(rows/columns count ) was not altered.Used this , instead seems to work

  <control template="/org/alfresco/components/form/controls/textarea.ftl">
                     <control-param name="rows">4</control-param>
                     <control-param name="columns">4</control-param>
                     <control-param name="maxLength">5000</control-param>
                     </control>