sercrod

04 - Forms

Replace the fixed draft value with a text input. This chapter only teaches how input writes to draft.

Code

<script src="/sercrod.js"></script>

<serc-rod data='{"draft":"","todos":[]}'>
	<h2>Todo</h2>
	<p>
		<label>
			Title:
			<input type="text" *input="draft">
		</label>
	</p>
	<p>Draft: %draft%</p>
</serc-rod>

How to read the form

Result

Todo

Draft: %draft%

Next

The next step will show different messages based on Todo state.

Previous: Events

Next: Conditions

Back to Tutorial index