W3C home > Mailing lists > Public > www-forms@w3.org > July 2007

Re: Any way to show the whole form to user?

From: David Landwehr <david.landwehr@picoforms.com>
Date: Mon, 09 Jul 2007 12:56:20 +0200
Message-ID: <46921454.7070909@picoforms.com>
To: duryodhan <duryodhan125@gmail.com>
CC: www-forms@w3.org

I don't think it is possible using xforms switch and case. However using 
model based switching it will be possible. With model base switch I mean 
the following:

If you have a switch case like
  <xf:case id="x1">
  <xf:case id="x2">

Then you would instead write
<xf:group ref="instance('ui')/activecase[.='x1']">
<xf:group ref="instance('ui')/activecase[.='x2']">
and have an instance in the model
<xf:instance id="ui">
  <data xmlns="">

Now an xf:toggle will instead be a setvalue, e.g.
<xf:toggle case="x2"> -> <xf:setvalue 

Doing this will make the groups work the same way as a switch/case 
construction. But now you have more control since you could say that all 
cases are active when activecase=* by putting the following in the 
instance('ui')/activecase[.='x1' or .='*']

This is the only way I can think of where you can control the appearance 
of switches.

Best regards,

duryodhan skrev:
> Hey,
> I was wondering if there is any way to show the whole XForm to the
> user when he clicks on submit?
> For e.g, take the mozilla xform Tax Forms e.g at
> http://www.mozilla.org/projects/xforms/samples/tax_form/TaxForm.xhtml
> Assume that I have added a submission to it, is there any way I could
> show the user all 3 sections together for him to take a quick glance
> over it and then okay! the submit? Any XForms markup which could
> achieve that ? Even an ugly hack would do!
> If there isn't , wouldn't this be a nice feature that a web developer
> could add or maybe the user could enforce through his XForms engine ?
> any comments/thoughts/notes/anything are appreciated.
> Regards,
> dev

David Landwehr
Senior Product Architect
web:    http://www.picoforms.com
blog:   http://landwehr.dk/blog/
e-mail: david.landwehr@picoforms.com
phone:  +45 24 27 55 18
Received on Monday, 9 July 2007 10:56:28 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:20 UTC