Search code examples
drupalcontent-management-system

Drupal allow multiple users to add and modify content


I want that multiple users can add things to a list. For example user 1 creates sth. like "What is needed for the best pizza in the world?" than other users should add sth. like 500 grams of whatever, 300 grams of sth.else ... If it's plain text i know how it's done, but i want sth like "click button for new ingredience". Any ideas?


Solution

  • You'll have a content type e.g. "Recipes".

    On that content type you'll have a field (Text) e.g. "Ingredients".

    In the settings for this field you'll have 'Number of values' set to Unlimited.

    Then when adding/editing a Recipe you'll see "Add another item" under the Ingredients list.

    If you wanted to alter the button text from "Add new item" to "Click button for new ingredience" (or something else) you'd need a hook_form_alter() function in a custom module.