2

In Drupal 7, I'd like to create a Person content type. A person may have multiple profiles - an administrator should be able to select which profile will be considered the primary one. So, that means that I need a tuple consisting of:

A textarea, for the profile text
A checkbox, indicating that this is the primary profile
A textbox, for naming this particular profile

I need functionality to behave like that of any of the lists: I can click "Add another Item", and a set of all three of these fields will appear.

I have a vague idea of how this can be executed, but it involves using the form API to add fields before the form renders each time, as well as the necessary AJAX behavior. This seems a bit overcomplicated, since this would also necessitate creating an additional DB table to hold these tacked-on fields.

Is there a relatively simple way of doing this solely through hook_install()?

1

The profile2 might fit your bill:

Profile2 allows for creating multiple profile types, which may be assigned to roles via permissions (e.g. a general profile + a customer profile)

| improve this answer | |

Your Answer

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

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