ditdot-dev / vue-flow-form

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

Question: how to set submitted manually in Vue 3 Composation Api #242

Closed erkage closed 2 years ago

erkage commented 2 years ago

Hi,

I can't figure out, how I can set manually the submitted to true when using Vue 3 Composation Api!?

Thanks in advance!

erkage commented 2 years ago

and also how to uset the methods like goToQuestion?

erkage commented 2 years ago

For the others:

<template>
   <flow-form
      :questions="questions"
      ref="vff"
   >
</template>

<script setup>
   ...
   const vff = ref(null);
   ...
</script>

And then you can use for example vff.value.goToQuestion(id) or vff.value.submitted = true.

mgd722 commented 2 years ago

old style:

this.$refs.vff.$data.submitted = true