Это мой код:
<div class="stepwizard col-md-offset-3">
<div class="stepwizard-row setup-panel">
<div class="stepwizard-step">
<a href="#step-1" type="button" class="btn btn-primary btn-circle">1</a>
<p>Step 1</p>
</div>
<div class="stepwizard-step">
<a href="#step-2" type="button" class="btn btn-default btn-circle" disabled="disabled">2</a>
<p>Step 2</p>
</div>
</div>
</div>
<form role="form" action="" method="post">
<div class="row setup-content" id="step-1">
<div class="col-xs-6 col-md-offset-3">
<div class="col-md-12">
<h3> Step 1</h3>
<div class="form-group">
<label for="CourseId" class="control-label">{{__("Курсы")}}</label>
<select id="CourseId" name="CourseId" class="form-control select2" style="width:100%">
<option selected disabled>{{__("Выберите курсы")}}...</option>
@foreach($courses as $course)
<option value="{{$course->Id}}">{{$course->Title}}</option>
@endforeach
</select>
</div>
<div class="form-group">
<label for="answers" class="control-label">{{__('Число')}}</label>
<div class="input-group input-ground-prepend">
<input type="number" class="form-control" name="number" id="number" value="{{old("number")}}" placeholder="{{__("Число")}}"/>
</div>
</div>
<button class="btn btn-primary nextBtn btn-lg pull-right" type="button">Next</button>
</div>
</div>
</div>
<div class="row setup-content" id="step-2">
<div class="col-xs-6 col-md-offset-3">
<div class="col-md-12">
<h3> Step 2</h3>
<input value="Завершить" type="submit" class=" btn btn-primary" style="float: right;"/>
<div class="form-group">
<label for="answers" class="control-label">{{__('Название теста')}}</label>
<div class="input-group input-ground-prepend">
<textarea type="text"
class="form-control"
name="title"
id="editor"
value="{{old("title")}}"
placeholder="{{__("Название теста")}}"></textarea>
</div>
</div>
<div id="demo"></div><br>
<input value="Добавить ответ" type="button" onclick="msg()" class=" btn btn-primary" style="float: right;"/>
<div id="save">
<button class="btn btn-primary" onclick="send()" type="button">Сохранить</button>
</div>
</div>
</div>
</div>
</form>
</div>
<!-- begining of page level js -->
<script src="https://cdn.ckeditor.com/ckeditor5/31.0.0/classic/ckeditor.js"></script>
<script src="//cdn.ckeditor.com/4.14.1/standard/ckeditor.js"></script>
<script>
var myClassicEditor;
ClassicEditor
.create( document.querySelector( '#editor' ) )
.then(editor => {myClassicEditor = editor;})
.catch(error => {console.error(error);})
</script>
<script>
$.ajaxSetup( {
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
function msg()
{
var x = document.createElement("INPUT");
x.type = "text";
x.name = "answers[]";
x.setAttribute("style", "margin-left:15px");
var checkbox = document.createElement('input');
checkbox.type = "checkbox";
demo.appendChild(checkbox);
document.getElementById("demo").appendChild(x);
const testElement = document.getElementById("demo");
const lineBreak = document.createElement('br');
testElement.appendChild(lineBreak);
}
function send()
{
}
</script>