ditdot-dev / vue-flow-form

Create conversational conditional-logic forms with Vue.js.
https://www.ditdot.hr/en/vue-flow-form
MIT License
785 stars 175 forks source link

Feature request: JSON set of question #247

Closed submgr closed 2 years ago

submgr commented 2 years ago

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 2 years ago

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