Form builder
Create form fields
For form fields that expect a date to be input, WebViewer provides an interactive date picker widget to select a date from a calendar. Users can still type the date, but the date field can also be populated by using the calendar.
The calendar will automatically set the correct date format for the field so the user doesn't need to worry about entering the date in a specific format.
Date picker fields and widget annotations can be added programmatically. There are several properties and widget flags as highlighted below:
Widget flag | Description | Unique to date picker? |
---|---|---|
READ_ONLY | The field value cannot be changed. | No |
REQUIRED | The field must have a value when exported. | No |
Just like other PDF form fields, the date field can also be filled programmatically using the fieldManager or using the Annotations.DatePickerWidgetAnnotation instance.
Here is an example of filling date field programmatically:
The default i18n configuration format looks like this:
You must provide 12 months and 7 weekdays (with abbreviations). Always specify weekdays in this order with Sunday first. You can change the firstDay
option to reorder if necessary (0: Sunday, 1: Monday, etc). You can also set isRTL
to true for languages that are read from right-to-left.
Annotations and fields should be added to the document only after the document has finished loading. See Create New Form Fields Overview for more.
Did you find this helpful?
Trial setup questions?
Ask experts on DiscordNeed other help?
Contact SupportPricing or product questions?
Contact Sales