Hello,
I’m trying to build a custom Questionnaire front end. The workflow is:
* A PDF with a form gets uploaded.
* A process finds the the form fields.
* A custom domain specific frontend in our application displays those fields for user input.
* The user enters the field values.
* Based on that, a PDF with the form filled gets generated.
Now there are two probably approaches to this:
1. Uploading a PDF form document and then adding a datasource with datasource fields based on the user entered values. Code snippet.
The problem with this approach is that Document::Field does not expose information like: field_type (text, multi-choice, boolean), is required, max field length. This is ofcourse needed to capture the user input in our application.
2. Uploading a PDF form document such that it creates a Questionnaire. Then the Question’s text can be auto mapped to the questions name via the API. We don’t care about the Question’s text as its already present in the PDF as a label next to the field. Doing this puts the Questionnaire in an active state. Now perhaps Executions, Datasource, DataSource::Fields can be created for it. The advantage for this approach is that Question exposes the field type information, which we need - although it seems roundabout as compared to the first approach.
I’m using the Ruby SDK. Can also use REST directly if it isn’t in the rubygem yet.
Any thoughts on this would be much appreciated.