I think I have a quite easy question but i don't know how I can implement this simple example in silverstripe.
This is the HTML code:
What is the question?
<input name="rbQuestion1" type="radio">A) possible answer 1
<input name="rbQuestion1" type="radio">B) possible answer 2
<input name="rbQuestion1" type="radio">C) possible answer 3
<input value="answer" onclick="checkQuestion" type="submit">
And I want to check in the function "checkQuestion" if the choosed answer is the right answer.
var QuestionChecked = false;
for (var i=0; i<window.document.Question1.length; i++)
QuestionChecked = true;
1) You can create a form (see [url]http://doc.silverstripe.org/recipes:forms[/url] or [url]http://doc.silverstripe.org/tutorial:3-forms[/url]) and a form validation. Might feel like huge overhead if you're new to SS, but very helpful when forms get bigger.
But now I don't know how I can implement the HTML-Code, because if I try to include the posted code in the SilverStripe editor, the editor delets a few things like the submit button and so on. Or do I also need your posted number 1 to realize what I want?