Skip to content

Instantly share code, notes, and snippets.

@avernet
Created September 12, 2014 22:31
Show Gist options
  • Save avernet/9a47173ed2fef289141c to your computer and use it in GitHub Desktop.
Save avernet/9a47173ed2fef289141c to your computer and use it in GitHub Desktop.
Test case for login and other fields autofill
<xh:html xmlns:xh="http://www.w3.org/1999/xhtml"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fr="http://orbeon.org/oxf/xml/form-runner">
<xh:head>
<xf:model>
<xf:instance>
<person>
<name/>
<address/>
<city/>
<username/>
<password/>
</person>
</xf:instance>
<xf:submission id="login" method="post" action="http://www.orbeon.com/"/>
</xf:model>
</xh:head>
<xh:body>
<xh:h2>Other forms autofill</xh:h2>
<xh:div class="row">
<xh:div class="span4">
<xf:input ref="name">
<xf:label>Name</xf:label>
</xf:input>
<xf:input ref="address">
<xf:label>Address</xf:label>
</xf:input>
<xf:input ref="city">
<xf:label>City</xf:label>
</xf:input>
</xh:div>
<xh:div class="span4">
<xf:input ref="name">
<xf:label>Name</xf:label>
</xf:input>
<xf:input ref="address">
<xf:label>Address</xf:label>
</xf:input>
<xf:input ref="city">
<xf:label>City</xf:label>
</xf:input>
</xh:div>
</xh:div>
<xh:h2>Login forms autofill</xh:h2>
<xh:div class="row">
<xh:div class="span4">
<xf:input ref="username" id="username">
<xf:label>Username</xf:label>
</xf:input>
<xf:secret ref="password" id="password">
<xf:label>Password</xf:label>
</xf:secret>
<xf:submit submission="login">
<xf:label>Submit</xf:label>
</xf:submit>
</xh:div>
<xh:div class="span4">
<xf:output ref="username">
<xf:label>Username</xf:label>
</xf:output>
<xf:output ref="password">
<xf:label>Password</xf:label>
</xf:output>
</xh:div>
</xh:div>
</xh:body>
</xh:html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment