- From: Erik Bruchez <ebruchez@orbeon.com>
- Date: Tue, 22 May 2018 10:19:43 -0700
- To: Steven Pemberton <steven.pemberton@cwi.nl>
- Cc: XForms <public-xformsusers@w3.org>
- Message-ID: <CAAc0PEUA+zjPvrs6s0GHQRmiWVwWoQW+0zq2UX-g3HeDFSTLVg@mail.gmail.com>
And after having written all that, I realize that you were talking about embedding a form within another form, not embedding a form within an HTML page. This said yes we had discussed sub-forms a long time ago, and in fact this was a proposed feature for XForms 2.0 but it got dropped. One big issue here is that of isolation. Ids, in particular, must remain unique or behavior will be unpredictable. This called from something like a shadow DOM: the embedded form would be completely hidden from its embedding form. Which then raises the question of how to communicate between the two. But yes, submissions and/or events could get us there. -Erik On Tue, May 22, 2018 at 10:14 AM Erik Bruchez <ebruchez@orbeon.com> wrote: > Some kind of embedding API would make sense. I don't have experience with > client-side embedding but an outline could look like this: > > You would point to an element and say that this is where your form must > be embedded, provide a reference to the XForms (inline or external), > provide initial data if needed, and tell your API to initialize your form. > You would provide a way for the API to call you back (callback, > promise/future, event) for the result of a submission. > > On the Forms side you could possibly interface with the embedding > application via a submission, but you could possibly also use events. > > -Erik > > On Mon, May 21, 2018 at 7:37 AM Steven Pemberton <steven.pemberton@cwi.nl> > wrote: > >> Hi gang, >> >> This is a sort of day-dream email. >> >> Recently I have had a number of use-cases that included embedding forms >> within forms (the biggest example of course being the test suite). >> >> My current method of doing this is to use an iframe; easy to do but with >> a >> hurdle: it is hard to communicate between the parent and child forms. >> The >> only way, it seems to me, is via a submit to a shared resource; not ideal. >> >> Has anyone tried such things already? >> >> It seems to me that the most XForms-like approach would be to >> pre-populate >> a child-form's instance in some way, and to return values using some >> form >> of submit to the parent. >> >> Any experience? >> >> Steven >> >>
Received on Tuesday, 22 May 2018 17:20:26 UTC