-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathEditForm.cshtml
21 lines (21 loc) · 1.27 KB
/
EditForm.cshtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
@model EditFormModel
<script src="https://unpkg.com/survey-core/survey.core.min.js"></script>
<script src="https://unpkg.com/survey-core/survey.i18n.min.js"></script>
<script src="https://unpkg.com/survey-js-ui/survey-js-ui.min.js"></script>
<script src="https://unpkg.com/survey-creator-core/survey-creator-core.min.js"></script>
<script src="https://unpkg.com/survey-creator-core/survey-creator-core.i18n.min.js"></script>
<script src="https://unpkg.com/survey-creator-js/survey-creator-js.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/survey-core/survey-core.min.css" />
<link rel="stylesheet" href="https://unpkg.com/survey-creator-core/survey-creator-core.css" />
<script src="~/js/form_api.js" asp-append-version="true"></script>
<script src="~/js/creatorjs.js" asp-append-version="true"></script>
<script src="~/js/codegenerator.js" asp-append-version="true"></script>
@{
ViewData["Title"] = "Edit Form as " + (Model.IsAdmin ? "Administrator: " : "Content Manager: ") + Model.FormTitle;
}
<div id="surveyCreatorContainer" style="height: 100vh;"></div>
<script>
const creator = new SurveyCreator.SurveyCreator(getCreatorOptions(false));
setupCreator(creator, "@Model.FormName", "@Model.IsAdmin" === "True");
creator.render("surveyCreatorContainer");
</script>