I have two content types (Unit and Scheme of Works). In Unit, I have a field (field_lo) that allows the user to create an unlimited number of entries.

In Scheme of Works, I need to associate other field values related to the field_lo entries from Unit. Effectively, in Scheme of Works, I need to be able to dynamically add a number of fields to match the quantity of the field_lo entries in Unit.

Is this possible? If so, how?


  • Two very different ways, but there should be more approaches depending on the use case: drupal.stackexchange.com/questions/259275/… and drupal.stackexchange.com/questions/33981/…
    – 4uk4
    Commented Jun 19, 2019 at 11:35
  • Presumably there is an entity relationship on the Scheme of Works where you select the Unit? If so, when you create a SoW there's no way to know which Unit is involved, suggesting you are going to need to wait until after that selection has occurred, meaning in practice we are looking at a JS alteration of the form. Does that make sense? Commented Jun 19, 2019 at 14:18
  • Alfred Armstrong - Scheme of Work has an entity relationship with Unit. Unit is always created before Scheme of Work, so we can refer to Unit in the creation of 'dynamic' fields in Scheme of works. Shouldn't (as far as I can understand) need to use JS to create the form for Scheme of Works.
    – gmak
    Commented Jun 19, 2019 at 17:13


Your Answer

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

Browse other questions tagged or ask your own question.