3

I want to set the number of values for a field to 3 but with add another item button next to first field. This button should disappear if number of items is equal to 3.

6
  • You want this functionality in your custom code ? Other wise drupal has the default functionality to control this. Aug 2 '14 at 10:14
  • Go to field setting page for example (Home » Administration » Structure » Content types » Article » Manage fields).In the settings page there is a option for field values in a select box.
    – DRUPWAY
    Aug 2 '14 at 10:16
  • Drupal render all fields simultaneously, I need this limitation with add another items. Aug 2 '14 at 10:22
  • 1
    It sounds pretty clear what he wants. The "add another item" behavior that is present when you chose "unlimited", but for a fixed maximum amount of field values and of course limited to that amount.
    – berliner
    Aug 2 '14 at 22:56
  • I think what you're asking for is: display a field with an [add] button next to it. When that button is pressed, show another field with another [add] button. If that second button is pressed, the third field appears, but no [add] button. If that's the case, look at form #states -- wunderkraut.com/blog/…
    – hargobind
    Sep 26 '14 at 11:11

Browse other questions tagged or ask your own question.