1 Reply Latest reply on Feb 28, 2013 8:28 PM by Sham HC

    Global form validation and File upload


      Im trying to create a from with field validation and global validation for uploaded file sizes.

      Used the default 'Store' Action.


      Trying to configure the global action based on the cq document, it  says "form-global validation is specified by configuring a resource type in the start form component".

      Could someone tell me what resource type can be given here ?


      This is what I tried:


      Created a nt:Folder node and set the sling:resourceType as 'apps/myProject/components/form/validation'. Under that node created clientvalidation.jsp and servervalidation.jsp and in the form start "Validation Resource Type" gave 'apps/myProject/components/form/validation'. Put a System.out.println on both servervalidation and clientvalidation.jsp.


      On form submit those jsps are not called. (the printlns are not in error.log or in console)


      Could someone tell, Im I doing the right steps ?

      Are there any detailed docs which could explain the form customization.


      Other issue with the out of box form is that on fileupload on form submit, if the other fields have errors, the selected file name is lost.


      Any suggestions on how to fix these issues ?