0

I want to create an application where the user input(from a form) determines the content of a generated document. This document needs to be formated, and the content has to be displayed in the correct order.


Example:

Webpage

Do you like dogs?

checkbox yes/no

Data values

(dogs:yes)

Document

This document has some automatically generated text in a specific style. But it does also contain information based on the values generated in the webapp

I see that you like dogs. Dogs are super cute, and they are said to be a mans best friend. This paragraph is pre-written and would change if the selection was different.

And this is some more automatically generated text, printed in a specific order.


I have started a ReactJS project to handle the user input, but I am not quite sure how to send the data results to generate an external doc.

I believe I need to keep all of the potetial text fields in an array, and print the relevant texts based on the results from the form. But this could prove difficult to organize as the set of potential text fields is quite huge.

I have already started this project, and this is a simplyfied description of my problem.

Any suggestions as to how I can achieve this? What is a good way to organize all the potential text sections that could be printed? Are there any packages, processing software i.e. that I can use to generate a document based on user input?

Any reply would be much appriciated!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.