I have written code under XDocument::onSaveRequest that works well in creating folders and the filename dependant on fields in the form.
This is fine whenever user wishes to save the form. My problem relates to the 'submission' of this form. This 'submission' is merely saving the form to a different location (as we have an legacy system that will pick it up automatically).
In order to manage this, when my submit button is created, it sets a variable value to 1, I then want the XDocument.onSaveRequest function to be called which has an if..statement looking for the variable set by submission. If present it saves the file to a different location.
Perhaps there is an easier way of managing this?
Many Thanks
Paul