1 Reply Latest reply on Jul 24, 2013 12:09 PM by rush_pawan

    Selectively store form elements to CRX




      I have a form with some form elements in it like textfields and a uploadFile. On submit i would like to store the text field values to  crx under usergenerated folder, but the uploaded file should not be stored  into crx. How do i specify if the upload file needs to be stored to crx or not ? . The purpose of the upload form element is that the form action is a mail and store component and the file will be emailed as an attachment.


      Thank you.


        • 1. Re: Selectively store form elements to CRX
          rush_pawan Level 4



          Can you plz clarify whether you really require the form post data to be stored in CRX? because looking at your use case you only want to send an email with attachment and if that is the case then i think its better not to submit the form as default and actually handle the form submittion at publish node level only via creating a POST.jsp file


          So what i mean is stop floating the form submittion information to author node (where it updates in usergenerated area) instead handle it at publish node level as normal form processing by creating a POST.jsp at the same page implementation. So for example let say if you have a page A, and having a A.jsp where you have the form so form action should be like a below


          <form method="POST" action="<%= resource.getPath() %>">


          once this form is submitted the request will go to POST.jsp and there you will have chance how you want to send the mail and in that case you can avoid the reversereplication to authors usergenerated area.


          Let me know if you need more information or any help.