Hey, for my project I would like to add surveyJS form on my website coding in svelte.
I succeeded but I have a latency time that I would like to make disappear.
I add the model of form with the JSON and not with the Id so I don't know why this latence before show the form.
I think it's may be the onMouth but i can't add the form without that otherwise it crashes
Here is my code :
JavaScript import 'survey-knockout/defaultV2.min.css';
import { theme } from '$lib/parts/survey/theme';
import {onMount} from "svelte";
let container: HTMLDivElement;
onMount(async () => {
const { Survey } = await import('survey-knockout');
const json = {
"elements": [...],
"showQuestionNumbers": false
};
const survey = new Survey(json);
survey.applyTheme(theme);
survey.showCompleteButton = false;
survey.render(container)
});
<div bind:this={container}></div>
I didn't find a good tuto to add surveyJS on svelte if someone could help me it will cool :)