Inspiration
Today’s post is inspired by this posting on the LiveCycle Google Group:
https://groups.google.com/forum/?fromgroups#!topic/livecycle/RNegH6JWUrk
The Problem
Tarek wanted to be able to submit an electronic form (eform) to a server without performing all the checks for mandatory fields. This is actually a very common requirement, and is most useful when you want to allow your users to save the eform as a draft copy back onto the server. Obviously, if you’re saving as draft, you want to allow the user to save the eform without all mandatory fields completed. (Note that you still do want all validation rules for non-blank data to be fired – otherwise you will get a whole lot of errors being displayed when you re-open the draft form.)
Tarek’s solution
Tarek has outlined his very clever code to achieve this. However, it’s quite complex, and requires code to be explicitly placed on every mandatory field in order to make it work. I haven’t tested it myself, but according to his own testing, it seems to work. Take a look at the link above to review his code.
Composer’s solution
This is the sort of thing we’ve been building into our electronic forms for years, and so we’ve added it as a standard feature in Composer. All you need to do is check one checkbox on the Submit button’s properties. Done. No fuss, no complicated code, nothing else to do.

Submit as Draft in Composer
But wait, there’s more…
You may also notice the “Clear hidden data on submit” checkbox, which is checked by default. This is another feature we provide by default.
Many larger organizations have very strict privacy policies. One of the common policies is that the user should be able to visually confirm all the information they are going to be submitting when they click the Submit button – no data should be submitted that isn’t visible. If the user enters some data into a field, and that field is subsequently hidden for some reason, the data is still there, but its now hidden – which violates the privacy policy. The “Clear hidden data on submit” checkbox causes the Submit button to go through all the hidden fields and clear their data before processing the submission.
Bottom line
At Avoka, we have several hundreds person-years of collective form building experience. We’ve taken that experience, encapsulated it, and built it directly into Composer. Many if not all of the more sophisticated features that you need in your eforms are already there, and all you need to do is use them. You can build PDF/XFA forms, or HTML5 forms for Desktop or Tablet from the same form design. Please contact us for more information or a trial.
http://www.avoka.com/content/avoka/en/company/contact_details.html
http://www.avoka.com/content/avoka/en/products/sff3/avoka-smartform-factory.html
Howard ,
Awesome solution ! It is clear that Smart Form Composer will save a lot of time to code such requirements.
However, in order to make it 100% meet the original requirements, we want to enable such feature “Submit as draft…” only for selected fields. That is why it requires code to be explicitly placed on every mandatory field “validate event” in order to make it work. I am not sure if your solution takes care of this, though it is not critical if it does not.
If this is not already implemented, I suggest to allow select a list of Fields “Collection” where this feature applies to “Submit as draft…”.
Tarek.
Hi Tarek
We do try to make things easier for building more sophisticated features in forms more easily, and I’m pleased that you like what we’ve done.
Thanks!
Our solution does not enable you to specify which fields are mandatory even if you’re only saving a draft. I’m very interested in the use-case for this – why would you require some fields to be mandatory even if the user hasn’t completed the form?
Many thanks,
Howard