Re: [Xsltforms-support] Calculation before submit ?
Brought to you by:
alain-couthures
From: Efraim F. <efr...@gm...> - 2011-03-29 16:29:18
|
Hi, On 03/29/2011 12:04 PM, Grégoire COLBERT wrote: > Hi! > > Is it possible to do a calculation just before the submission of an > instance? Can I use the "calculate" attribute of a xf:bind to do this? > Two ideas: 1. (Answer: yes, you can) Have the xf:input reference a separate instance than the one you send, use an xf:bind with @calculate, binding the one you actually send and calculating with the value from the xf:input. The value in the instance should then *always* be the hashed password - not just before you submit. I think this is the better solution. 2. Capture the xforms-submit event in your submission and use xf:setvalue to set the hashed value. Then, the hash will only be present before the submission. You can capture xforms-submit-done and xforms-submit-error to clear the hashed copy. -- --- Efraim Feinstein Lead Developer Open Siddur Project http://opensiddur.net http://wiki.jewishliturgy.org |