3

I have a weird use case, where I was looking to perform the following:

  • In a node edit form, allow a user to entity reference a collection of webforms
  • When a user selects an appropriate webform from the entity reference autocomplete, render that form in the current node edit form
  • User fills out fields in these webforms then proceeds to save the node.
  • On node save, the webform submit data is stored in a particular field in the node (perhaps in json format).

Is this even possible with webforms, or do any other form modules exist that support this use case?

7
  • This seems counterproductive to what Webform (basically) provides. What is the use case?
    – Kevin
    Commented Mar 23, 2017 at 22:04
  • We're basically trying to compose a page using reusable components. For example, a page may contain a hero with 3 fields (image, title, subtitle), followed by a 3 col layout which may contain the fields -title, paragraph. The idea was to use a schema form to define these fields and reference the forms we needed in the node form via entity references. The user can add values to these webform fields and build a page with this. We could also use content types, but that would drastically increase the number of content types we use. Idea was derived from here - jeremydorn.com/json-editor
    – comm33
    Commented Mar 24, 2017 at 0:25
  • 2
    You might want to look at Paragraphs module first.
    – Kevin
    Commented Mar 24, 2017 at 0:26
  • I completely agree with @Kevin, just adding this module drupal.org/project/classy_paragraphs which might help in the front end part of the solution as well. " Classy paragraphs ships a new field type "Class list" which allows an editor to apply a selected class to paragraphs via a drop-down list." Commented Mar 24, 2017 at 1:07
  • Great, thanks all, I really appreciate it! I'll play with the paragraphs module and let you know if it covers my needs!
    – comm33
    Commented Mar 24, 2017 at 17:03

1 Answer 1

0

In this instance it sounds like the paragraphs module solves your problem. However to answer your original question...

I would use entityform, not webform to do this.

Once you added all of your field to your entity form then you can use Inline Entity Form to embed the child form.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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