I've just opened this discussion free to everyone to discuss about any easy way to validate / reset form fields.
I'm providing a development tool to be used in LiveCycle Designer with a new way to validate and reset forms in any ways. You can change the design of PDF Forms without having to change much code.
The validation function is to validate any field which returns null / 0
It is independent / self-responsive to the design of any forms. I'm working on the function to make sure it can work with any kind of settings set in PDF forms.
The objects which contains the functions are not to modify (unless you know what to modify), you can add any specific validation to your form by adding field/subform names in the exception arrays.
All your specific validation is to be inserted in the validate buttons. It is also possible to validate only a part of the form, 1 page, 2 pages or a subform only.
Instructions to use the functions are in the PDF Form to download below, take a look, feedback and questions are always welcome as well.
Hope this will help some of you.
I'm back with another problem. I've been honing your sample script into a couple of forms of mine. Recently, the front office folks have made several changes to theit original which I now need to incorporate into my form.
When I was informed they had changes coming down, I tabled my work on the form. Well, now that I have thier changes, I went to print out what I currently have so I can do a side by side compare and mark up the changes I need to do.....and found the form wont print.
I keep getting a pages not selected error. I did discover that if the form is completely filled in, it will print.
I looked through your script object and all my additional scripts for anything that looks like it might stop a print request but did not find anything. Have you experienced anything similar with forms using your validation script?
Any help would be appreciated! Thanks!
I have added some bling bling to my validation to make it look more like Adobe Validation with the red borders for each fields that is not filled in to make it better for the user.
Take a look, the last version is still up in case that this latest version has some minor errors.. I doubt there is errors but we never know..
The PDF is stored on google drive and need to be downloaded on your computer to preview the form...
if you can't download it I can send it by email no prob
I am very sorry for the latest version I've provided to some of you...
I took a look at it and realize there was some errors with the validation...
I've updated the version so now it is working well...
Eventually I'll make a more complex and complete form of the validation / reset script functions..
for now enjoy the functions and again I'm sorry for the inconvenience!
Hi everyone, I'm back with new features!
I've implemented new functionalities within the form
New Functionalities consists in giving you better ideas for good user friendly choices.
I've decided to give to the public my ideas for different options for managing a PDF Form.
This is only basics as to what it can really do when creating complex forms.
I hope this will help you throughout your forms creations.
New Functionalities :
Change group of fields from open to readOnly, and from readOnly to open
Dialog Manager to be able to manage the form's object/subform/sub-sections presence at the beginning of the form instead of throughout the form.
Multiple Dialogs Wizard (Next and Previous dialogs), for multiple options ('x' number of checkboxes)
Also I've improved the Validate and Reset functions
If anyone has any ideas that would like to be developed and/or added to this form, please inform me it would be my pleasure to add new features for a complete help form.
I have many other ideas upcoming, this is not the end for developing this form.
Hope this will come in handy!
I've applied an update with minor changes...
Fixed an issue where a dialog could not be executed.
Added a date version, (Form's Last Update).
Fixed an issue with today's date populated automatically within the date field at the top of the form.
I'm sorry, what exactly do you mean?
The updated version is provided in the links above, I only update the file on the cloud so I don't have to provide a new link each time.. if that's what you're asking?
Sorry for confusing.
I have a pdf file with submit button.
While clicking this buttion, it gives a popup and the user has to save the file in the relevant folder. Instead of this, can we write a code or using js, do we save the pdf into the predefined folder automatically with the name of login username along with date and timestamp.
Hope i have explained and not confused.
If you have some sample documents, pls share.
As I said in the other post, you need to create a trusted function within a (*.js) file to do this, otherwise Adobe's security won't let you predefined the name or path of the file.
Here is a thread in which they have discussed this matter and the complete solution is provided. Although it is not very convenient to do this because you will need to have the (*.js) file on each user's computer to have this trusted function working.
I am having the same problem as a few others as I am unable to download the pdf and/or save it to my Google Drive.
Can you email it to me? I am very much looking forward to getting your advice on the reset function.
Thanks for the email, Magus! Your example is very encouraging.
How would you go about writing script for that? Would I follow the same script format as your "Reset all but specific Fields" example, but insert "(untitled Subform) (page1)" instead?
Any help you can give a beginner is appreciated.
if you want to use the reset all but specific fields, your subforms and objects must have names...
Unfortunately the reset functions work based on names of objects..
By inserting names of objects in the Exception array "tabExceptionFields", it will iterates through the whole form and excludes the objects you have specified.
Otherwise, if you only want to exclude page 2 of the reset, you can use the function resetData and send only page 1 or any other pages to reset instead of reseting the whole form.
You can use resetData with the following :
As long as you are specifying the property somExpression of the subform you want to reset, you will reset that part and every fields inside of it only...
I hope this will help
How difficult is it to rename the pages after the form has been built? I
could do it if I knew how to do it while maintaining the integrity of the
document functionality. I don't mind tedious changes, but complicated may
be a deal-breaker.
Thanks and have a good weekend!
There's a way to do this, first make sure you know how your page is named in your code should be something like "#subform" or "#subform"... Make sure it is the only one with this name first, otherwise every different reference_syntax that uses this name might be changed if you don't do this right... that specific page should be called with the following :
make sure to change all these instances in your code for the new name you have entered for you page.
An easy way to do this is to use the functionality CTRL + H which can replace all instances of a specified string for another string, but I suggest you do them 1 by 1 using the CTRL + H.
You can see all the events if you click on the "TopMostSubform" and select the All Events in the drop down events.
Hope this will help you.
Don't forget to keep an old copy of you form!
Thanks for advising me about this, I will need to update the form according to what you've asked, I should post an update of the form whenever I'll have the time to work on it. Therefore, I will try to make it convenient to reset or validate objects not only based on names, but on somExpression as well.
Thank you again!