Control.Form
Widget demo
To experience a whole new way of using form elements, press the submit button leaving all other fields blank.
Javascript code
// The tricky part is adding onsubmit="return formSubmit(this)"
// to the form's declaration.
Meteora.uses('Control.Form');
// to the form's declaration.
Meteora.uses('Control.Form');
HTML code
<form method="post" onsubmit="return formSubmit(this)" action="/demo/ajax_jsonrpc">
<label>
Required field:
<input class="required" name="req_input" type="text" />
</label>
<label>
Required select:
<select name="req_select" class="required">
<option></option>
<option value="1">Option one</option>
<option value="2">Option two</option>
<option value="3">Option three</option>
</select>
</label>
<label>
Optional field:
<input name="opt_input" type="text" />
</label>
<div class="buttons">
<button type="reset">Reset</button>
<button type="submit">Send</button>
</div>
</form>
<label>
Required field:
<input class="required" name="req_input" type="text" />
</label>
<label>
Required select:
<select name="req_select" class="required">
<option></option>
<option value="1">Option one</option>
<option value="2">Option two</option>
<option value="3">Option three</option>
</select>
</label>
<label>
Optional field:
<input name="opt_input" type="text" />
</label>
<div class="buttons">
<button type="reset">Reset</button>
<button type="submit">Send</button>
</div>
</form>