Attached is a JSON file for my survey that I am using for an E-Waste Recycling event. I have been trying for weeks to embed this into my webpage with no luck. There is no help anywhere on the internet and this is my last resort. I am running this on a webserver which will be isolated from the internet. How can I get this to work?
How to embed a survey into a webpage
Answers
Hello Harrison,
Here is your example: https://plnkr.co/edit/qEyN1DFMQdLC3ZhZeDvb?p=preview
You data is a string. I have removed "[ from the beginning and ]" from the end.
If you have data as a string, then you have to parse it to json object first as:
JavaScriptvar survey = new Survey.Model(JSON.parse(data));
If you want to parse json as a string, please make sure it is correct. In your package.json the data string object has new lines and JavaScript will generate error on parsing your code.
Thank you,
Andrew
SurveyJS Team
Thank you. But I am still having some troubles reguarding the initial checkboxes. They are set to disabled, and when I attempt to change this, it does not work. All it shows is a crossed out circle on my cursor whenever I hover over them. Why is this happening?
It is hard to say what is going on. Probably you have readonly attribute set to true, or enableIf expression.
Thank you,
Andrew
SurveyJS Team