blob: bc82113c65ff1651f8eab1eabe62a164b6eec5d7 [file] [log] [blame]
<html t:type="Border" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
<h1>Form Fragment Demo</h1>
<form t:id="form">
<t:errors/>
<t:label for="name"/>
<t:textfield t:id="name" value="subscribe.name"/>
<label class="checkbox">
<t:checkbox t:id="subscribeToEmail" t:mixins="triggerfragment" fragment="showEmail"/>
Subscribe to Email?
</label>
<t:formfragment t:id="showEmail" visible="subscribeToEmail" hide="fade">
<t:label for="email"/>
<t:textfield t:id="email" value="subscribe.email"/>
</t:formfragment>
<t:radiogroup value="codeVisible">
<label class="radio">
<t:radio t:id="on" value="true"/>
On
</label>
<label class="radio">
<t:radio t:id="off" t:mixins="triggerfragment" fragment="codeFragment"
invert="true" value="false"/>
Off
</label>
</t:radiogroup>
<t:formfragment t:id="codeFragment" visible="codeVisible">
<t:label for="code"/>
<t:textfield t:id="code" value="subscribe.code"/>
</t:formfragment>
<label>
<t:checkbox t:id="subVisible" t:mixins="triggerfragment" fragment="editSub"/>
Edit Sub? (whatever that is)
</label>
<t:formfragment t:id="editSub" visible="subVisible" alwayssubmit="true" hide="fade">
<t:label for="sub"/>
<t:textfield t:id="sub" value="subscribe.sub"/>
</t:formfragment>
<input type="submit" class="btn btn-primary" value="Subscribe"/>
</form>
<t:actionlink t:id="clear" class="btn">Clear Errors</t:actionlink>
</html>