ditdot-dev/vue-flow-form

Feature request: JSON set of question

submgr opened this issue · 1 comments

Now questions have to be hardcoded directly in the application code. I want to show different questions within the same project.

We specify questions and other data in the JSON format, why not put it in a separate static file, is it possible?

spinn commented

Hi @SubMGRru,

this is possible - you can define your questions in a separate JS or JSON file (depending on your environment) and after loading it, construct the questions array and pass it to Vue Flow Form. Take a look at how the questions are defined in the support page example to get a better idea:

https://github.com/ditdot-dev/vue-flow-form/blob/master/examples/support-page/Example.vue#L80-L156