From: daniele i. <dan...@gm...> - 2011-07-22 08:58:44
|
Hello guys, I have a problem with betterform. I wrote you a mail about a problem that we add before that has been solved wit your solution: We have for example a list of books: <books> <book> ... </book> ... <book> ... </book> </books> we have a form to insert a new book so in the instance we have a template for the book and when the user click save the new book we would like to validate the instance so we don't want allow to the user to insert invalid book To solve this problem your solution was that to use a submission that you use for test in order to validate the template of the book and only in the case of xforms-submit-done we will insert the book in the list: <xf:submission id="FakeLPSubmission" replace="instance" action="echo:foo" method="post" ref="instance('templateBook')" validate="true"> <xf:action ev:event="xforms-submit-error"> <xf:message level="modal">You cannot save the Book.</xf:message> </xf:action> <xf:action ev:event="xforms-submit-done"> //insert book </xf:action> </xf:submission> we have done this but when the user insert a not valid content of the book he has the right submission failed with the message "You cannot save the Book" but appear also other alerts that maybe are defined also in other tab all on the top of the page on the right...so the behaviour of alerts is a little bit strange are you aware about it? You have a woraround? thank you Daniele Ippoliti |