1

I have a Freeform which collects information on item(s) to be converted from analog to digital (VHS tape 16mm film, etc). The form requires the user to be logged in.

There may be cases where the user fills out the form more than once, because they have more than one item to convert. I want to do two things:

  • Save the results of each form submission in a standard Craft entry. I believe I understand how to do this, I just need to hook up all the fields.
  • Relate one or more form submissions to a single "order", which I believe would be represented by a single Craft entry.

An order entry would have:

  • User
  • Date
  • Relationship to 1 or more form submissions.

What is simplest way to accomplish this? FYI, I do not want to write a custom plug-in, nor write a lot of code.

My first thought was to create an initial order form which collects only the title of the order, and then pass that via a query string or JavaScript into the second form, thus creating a relationship where the first form is the "parent" and submissions of the second form are the children.

2

I was thinking about this myself, and I found the following 2 articles which I have been going over. It looks like it is quite possible:

http://craftsnippets.com/articles/using-template-hooks-in-craft-cms

https://docs.solspace.com/craft/freeform/v3/overview/relations.html#overview

The 2nd link has a heading for “Relating more than one element” which looks like it would apply in your situation.

1
  • Thanks, I didn't realize these relationships could be created so easily. This put me on the right track. :) – 4midori Jan 23 at 19:41
1

I just realized that I can also use the Craft UI element in the field layout designer to accomplish this. http://craftsnippets.com/articles/using-template-ui-elements-to-extend-craft-cms-control-panel

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.