Hi Mark,

we use a similar (although more generic) data structure in our openforms 
frameworks.

I think I should definitely present our tools at the next WOWWDC, if there will 
ever such a thing...




Am 20.12.2018 um 08:40 schrieb Mark Wardle 
<m...@wardle.org<mailto:m...@wardle.org>>:

Thanks Paul. No, not at all wedded. In fact, I've been stupid in that I did 
something similar with modelling consent forms and the responses, but for some 
reason simply couldn't see beyond the end of my own nose on this one!

Thanks all,

Now to get on and implement...

<image.png>

On Thu, 20 Dec 2018 at 03:58, Paul Hoadley 
<pa...@logicsquad.net<mailto:pa...@logicsquad.net>> wrote:
Hi Mark,

On 20 Dec 2018, at 07:37, Samuel Pelletier 
<sam...@samkar.com<mailto:sam...@samkar.com>> wrote:

I've done dynamic forms in the past (in PHP and WO) and never tried to map them 
to an ORM entity. I think it is better to model your a Form entity and another 
one for answers (FilledForm or CompletedForm). The Form entity is the Meta 
model with the questions and the other contains only answers. You end with 2 
symmetric hierarchies with one answer class for each question type class 
(numeric, text, choice, boolean, image, ...). Each of the Answer class has it's 
edit component.

The display form component is build by displaying the proper edit component for 
each answer in order. For easy D2W integration, I think you can initialize a 
new form  with blank answers and simply use the D2W magic to display the 
complete form (using an ordered toMany from the CompletedForm entity to it's 
answers) .

FWIW, that's pretty much exactly how we implemented a SurveyMonkey/Survs-style 
"create your own arbitrary survey" project for a client a few years ago. It 
worked reasonably well, and it's still in use. Are you wedded to the dynamic 
model approach you describe, Mark?



Mit freundlichen Grüßen

René Bock

--
Telefon: +49 69 650096 18

salient GmbH, Lindleystraße 12, 60314 Frankfurt
Telefon Zentrale: 069 / 65 00 96 - 0  |  
www.salient-doremus.de<http://www.salient-doremus.de>

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to