surveyjs_react_quickstart icon indicating copy to clipboard operation
surveyjs_react_quickstart copied to clipboard

Edit The Form

Open tabeshR opened this issue 5 years ago • 2 comments

Hi I want to edit the form after I created it I Should Pass It To Form Creator And Then Edit It, How Can I Do That ?

tabeshR avatar Jul 26 '20 10:07 tabeshR

You can get designed survey JSON from the SurveyJS Creator via the "creator.JSON" property and create a new survey model with this JSON

tsv2013 avatar Jul 26 '20 12:07 tsv2013

All code can be found in this repo

// You can get designed survey JSON from the SurveyJS Creator via the "creator.JSON" property
var surveyJSON = creator.JSON;
....
    // create a new survey model with this JSON
    var survey = new Survey.Model(surveyJSON);
    return (
        <Survey.Survey model={survey} />
    );

https://github.com/surveyjs/surveyjs_react_quickstart/blob/master/src/Survey.js#L55-L64

tsv2013 avatar Jul 27 '20 07:07 tsv2013