Hi Mark,

On 20 Dec 2018, at 07:37, Samuel Pelletier <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?


-- 
Paul Hoadley
https://logicsquad.net/
https://www.linkedin.com/company/logic-squad/

 _______________________________________________
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