let suppose I want to create a cast table, in one field with multi value write down actors and in another write down their roles, as example

 A has "role A"
 B has "role B"
 C          (no role)
 D gas "role D"

I fill up field actor with 4 value (it is multi value text field),


then in field roles I write down 3 value, the actor "C" has no role

1)"role A"
2)"role B"
4)"role D"


then when I save , I want to show each actor and field in pair, first value of field actor with first value of field role, but if a actor has not role every thing mixed up

 A has "role A"
 B has "role B"
 C has "role D"

Is there any way to drupal consider a empty field as filled up field and do not ignore it in save specially between filled up field?

  • This is not a direct answer to your Q, but I'd suggest using a field collection (or a custom field) to store both the actor name and their role together, rather than trying to reconcile the two fields as you currently are. – Andy Aug 11 '14 at 14:24
  • @Andy I did it with field collection, in field collection have 2 field, actor and role – Yusef Mohamadi Aug 12 '14 at 4:36
  • Do you have a single-value field collection with multi-value actor and role fields, or a multi-value field collection with single-value actor and role fields? (I'm suggesting the latter, but I guess from your problem you must be using the former?) – Andy Aug 12 '14 at 11:01
  • multi value field collection with in each of one , multi actor with multi role :) – Yusef Mohamadi Aug 12 '14 at 19:36
  • If you have a multi-value field collection with a single-value required actor field, and a single-value optional role field, that should solve your display problems. – Andy Aug 13 '14 at 10:19

Your Answer

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

Browse other questions tagged or ask your own question.