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('Meteora.Form');
// to the form's declaration.
Meteora.uses('Meteora.Form');
HTML code
<form method="post" onsubmit="return formSubmit(this)" action="/demo/ajax_jsonrpc">
<label>
Required field:<br />
<input class="required" name="req_input" type="text" />
</label>
<label>
Required select:<br />
<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:<br />
<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:<br />
<input class="required" name="req_input" type="text" />
</label>
<label>
Required select:<br />
<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:<br />
<input name="opt_input" type="text" />
</label>
<div class="buttons">
<button type="reset">Reset</button>
<button type="submit">Send</button>
</div>
</form>