W3C home > Mailing lists > Public > www-forms@w3.org > April 2004

XForms Actions

From: Robert Bateman <bobbateman@sequoiallc.com>
Date: Tue, 20 Apr 2004 09:57:53 -0400
To: <www-forms@w3.org>
Message-Id: <200404200957.53694.bobbateman@sequoiallc.com>

So far, I've been only played with XForms action within <select1> code.  My 
code looks for an xforms-value-changed event and takes some action.

Now I would like to do something similar but with an <input> field.  My goal 
is to have the value of my input copied to another field once the 
xforms-value-changed event fires.

For example:  I have 2 fields "field1" and "field2".  Both contain peoples 
names.  On my form, an order form, I have to consider that field2 is editable 
if the user takes a specific path thru the form.  Both field1 and field2 are 
required to exist and can not be nill.

My thought was to add an event to field1 that traps xforms-value-changed and 
do a <setvalue> of field2.  I also would add a group around field2 
controlling when its <input> is active to the user.

All's well in my thoughts.  Unfortunately, I don't seem to be able to use an 
<action> inside of my <input> for field1.   Has anyone accomplished this sort 
of data copying using actions inside of inputs?

Thanks!

Bob
Received on Tuesday, 20 April 2004 10:00:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:21:57 GMT