[SOLVED] Adding alert messages to xform elements

classic Classic list List threaded Threaded
2 messages Options
DL
Reply | Threaded
Open this post in threaded view
|

[SOLVED] Adding alert messages to xform elements

DL
This post was updated on .
In this bookcast example there are no alert messages attached to "ratings" and "notes" elements.

http://www.orbeon.com/orbeon/xforms-bookcast/

How would I add alert messages to the ratings element and textarea element in this example?
I've tried adding a line of code into <xforms:textarea element in view.xhtml .. ..


<xforms:textarea ref="notes" appearance="xxforms:autosize">
<xforms:label class="books-label">Notes</xforms:label>
<xforms:alert>testing alert .. Notes are required</xforms:alert>
</xforms:textarea>


Thanks.

[Later Edit]

I've figured it out by studying view.xhtml .. I had to add "notes" into <xforms:bind />


<xforms:bind nodeset="instance('books-instance')/book">
<xforms:bind nodeset="title" required="true()"/>
<xforms:bind nodeset="author" required="true()"/>               
<xforms:bind nodeset="notes" required="true()"/>
</xforms:bind>


Reply | Threaded
Open this post in threaded view
|

Re: Adding alert messages to xform elements

Erik Bruchez
Administrator
That looks about right. Yes, the idea is to add <xforms:alert>.

-Erik

On Sat, May 26, 2012 at 6:20 AM, DL <[hidden email]> wrote:

> In this bookcast example there are no alert messages attached to ratings and
> notes elements.
>
> http://www.orbeon.com/orbeon/xforms-bookcast/
>
> How would I add alert messages to the ratings element and textarea element
> in this example?
> I've tried adding a line of code into <xforms:textarea element in view.xhtml
> .. ..
>
> &lt;quote>
> <xforms:textarea ref="notes" appearance="xxforms:autosize">
> <xforms:label class="books-label">Notes</xforms:label>
> <xforms:alert>testing alert .. Notes are required</xforms:alert>
> </xforms:textarea>
>
>
> Thanks.
>
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Adding-alert-messages-to-xform-elements-tp4655143.html
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws