It is seldom confusing the form developer that, the prePrint logic executes even if the print was cancelled using xfa.event.cancelAction = true;
It is also uncommon to see the postPrint logic is executing even after the print was cancelled.
Solution
Few tips to use the correct approach to prevent printing and handling postPrint event logic.
Smart forms often require styling on form field upon focus, blur, validation errors etc.
Writing codes to style individual fields is tedious and leads to code ambiguity.
Solution
Event Propagation introduced in XFA since 3.0 helps form developers to elegantly style the collections of fields under any containers (e.g. Subform, Table etc.)
Where dropdowns have a lot of items, it can be frustrating for the user to have to scroll down through the list in order to make a selection.
Solution
Make one small change to the dropdown and add a simple line of script to the enter event, you can turn your standard dropdown into a filterable list. There is an optional script for the exit event, if you want to prevent the user from inputting a value that does not match an item in the list.
Need to capture system date and then compare it to the date that user enters in a date field and determine if the user has entered the current date or not.
Solution
Look at the code sample which solves your problem.
I am needing a process that imports data columns from a user defined source excel sheet and populate a predefined PDf form with predefined fields.
Solution
I have created a custom DSC which can be used to convert Microsoft Excel documents into XML. The component accepts an excel document, creates XML nodes based on the first row (assumed as header and it can be omitted) and resulting org.w3c.dom.Document object.
This XML can then be imported into dynamic PDF files.
Where dropdowns have a lot of items, it can be frustrating for the user to have to scroll down through the list in order to make a selection.
Solution
Make one small change to the dropdown and add a simple line of script to the enter event, you can turn your standard dropdown into a filterable list. There is an optional script for the exit event, if you want to prevent the user from inputting a value that does not match an item in the list.
While creating interactive forms with table of data in it, it is helpful to the form users if the data columns in the table are sortable. I have addressed this requirement is ubiquitous; hence wrote a sample Javascript function which sorts the table column's in ascending/descending order
Solution
The sorting can be done with few simple steps as shown below:
1. Exporting the Table data into an XML variable
2. Create a two dimensional array and initialize the array with the XML data
3. Sort the two-dimensional array
4. Update the table data
5. Re-merge the form layout with the modified data
After you develop a form in LiveCycle, the users can have very different experiences with the form depending on the software they are using and if / how the form has been Reader Enabled. The various options that are available or disabled can be confusing.
Solution
This PDF sets out the four options that a developer should consider before you deploy the form. In essence you are looking at the user and the likelihood that they only have Reader and not the full Acrobat. If this is the case then they may not be able to use all of the features that you built into the form.
In a dynamic form rows can be added and deleted from a table, but if there is a calculated sequence number then all rows may need to be recalculated depending on where the row was inserted or deleted.
Solution
Using the XFA form dependency tracking for calculate event scripts we can easily recalculate the sequence number with two lines of JavaScript.
Some events fire more often than others. Depending on what the designer is trying to achieve, this can be inefficient and may not have the desired effect at runtime. Another issue is the sequence in which events fire. A designer may have a requirement for several scripts to fire in a certain sequence. Having an understanding of how LC Designer and Acrobat fire events can help at design time.
Solution
I original had the idea of having a form that set out the pros and cons of each event and giving examples of script that could be used in each event. In the end, it has focused on the number of times that different events fire and the sequence. To view this form you will need Acrobat/Reader version 9 or above. This is because it contains script against the preOpen and postOpen events. Also it used setItems to populate the listbox.
This site is produced in partnership with O'Reilly.