Skip to content

Instantly share code, notes, and snippets.

@avernet
Last active November 28, 2017 18:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avernet/ab887bccf7f366d56a0cca3182ee760b to your computer and use it in GitHub Desktop.
Save avernet/ab887bccf7f366d56a0cca3182ee760b to your computer and use it in GitHub Desktop.
Dialog capturing an email address, which can be shown from a process

Usage

  • Requires Orbeon Forms 2017.2 or later, for the support of the oxf.fr.detail.dialogs.custom.*.* property, which provides support for custom dialogs.
  • The file my-email-dialog.xml below goes in WEB-INF/resources/forms/resources.
  • See the file properties-local.xml below for the property to add to your own properties-local.xml.

References

<xxf:dialog
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xh="http://www.w3.org/1999/xhtml"
xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
id="my-email-dialog"
level="modal"
close="false"
draggable="true"
class="fr-dialog fr-clear-confirm-dialog">
<xf:label>Email</xf:label>
<xh:div>
<xf:input id="my-email-input" ref="//email"/>
</xh:div>
<xh:div class="fr-dialog-buttons">
<xf:group>
<xxf:hide ev:event="DOMActivate" dialog="my-email-dialog"/>
<xf:trigger>
<xf:label>OK</xf:label>
<xxf:hide ev:event="DOMActivate" dialog="my-email-dialog"/>
</xf:trigger>
</xf:group>
</xh:div>
<xf:setfocus ev:event="xxforms-dialog-open" control="my-email-input"/>
</xxf:dialog>
<properties xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:oxf="http://www.orbeon.com/oxf/processors"
xmlns:xxf="http://orbeon.org/oxf/xml/xforms">
<property
as="xs:string"
name="oxf.fr.detail.dialogs.custom.*.*"
value="oxf:/forms/resources/my-email-dialog.xml"/>
</properties>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment