I have added a signature pad to a survey with SurveyCreator and it displays in the test panel of SurveyCreator. However it does not display when I run my Survey.model. I even tried a Survey that has only a signature pad and that resulted in "No displayable or visible elements"
I notice that in SurveyCreator the widgets are imported with
import * as widgets from "surveyjs-widgets";
widgets.signaturepad(SurveyKo);
I suspect that the widgets library needs to be imported into the displayed survey but have been unsuccesful doing that.
I am using react for my js library.
The code is as follows:
import * as Survey from 'survey-react';
render(){
Survey.Survey.cssType = "bootstrap";
Survey.defaultBootstrapCss.navigationButton = "btn btn-green";
Survey
.JsonObject
.metaData
.addProperty("question", {
name: "conceptCode:string",
default: "",
choices: this.choices
});
const model = new Survey.Model(this.propJSON);
model.data = this.props.savedData[0];
model.currentPageNo = this.props.savedData[1];
model.sendResultOnPageNext = true;
return(
<div id="surveyContainer">
<Survey.Survey
model={model}
onComplete={this.onSurveyComplete}
onPartialSend={this.onSurveyPartialSend}
/>
</div>
);
}