Title: Participant relationhsips
Last modified: August 21, 2016

---

# Participant relationhsips

 *  [dwightlathan77](https://wordpress.org/support/users/dwightlathan77/)
 * (@dwightlathan77)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/participant-relationhsips/)
 * I would appreciate the ability to add relationships between Participants from
   the edit page where a select box is populated with the participants, even if 
   its limited to a single relationship or relationship type for each Participant.
 * [http://wordpress.org/plugins/participants-database/](http://wordpress.org/plugins/participants-database/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [xnau webdesign](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/participant-relationhsips/#post-4002574)
 * Sounds interesting, but why do you want to do this? There may be an easier way…
 *  Thread Starter [dwightlathan77](https://wordpress.org/support/users/dwightlathan77/)
 * (@dwightlathan77)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/participant-relationhsips/#post-4002594)
 * I brought it up because I thought it might be useful for mapping groups of participants
   who are related by family or group. I am also interested in tracking who inspired
   others to join an organization and who may be mentoring them.
 * In my specific case I have parents and minors both qualified to volunteer who
   I would like to associate together from within the module, but have resorted 
   to looking up a parent’s unique id from one browser tab and copying it into a
   relation field stored in the Participants Database.
 *  Plugin Author [xnau webdesign](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/participant-relationhsips/#post-4002641)
 * I understand. With something like this it’s really all about the user interface,
   answering the question “what does the user do to set up the relation?” The easier
   it is for the user, usually the more complex it is on the code side. For instance,
   probably the easiest way for the user to set up the relation is for them to start
   typing in the name of the related person, with the code suggesting a match as
   soon as it has enough info to identify it. That would require a fairly sophisticated
   piece of Javascript to get that done.
 * A much simpler approach would be to offer an alphabetized list of all the last
   names (or first names) in a dropdown, which once selected, offers a dropdown 
   of all the matching first names to complete the record…again you’d need some 
   Javascript to populate the second dropdown. Simpler still would be a massive 
   dropdown that contained all the names…not too bad until the list gets to be near
   100 records. You wouldn’t need any Javascript for that, just a special template
   that populated the dropdown when the form was displayed.
 * It’s also possible to post-process the submission: the user just types in the
   full name of the related person, then when the record is submitted, some custom
   code tries to find a match and adds the record ID once it finds it.
 * Of course it all requires custom code. If I were to consider adding a feature
   like this to the plugin, I’d have to come up with a generalized approach that
   would be useful to anybody that wanted to use the feature for any of kind of 
   relation.
 *  Thread Starter [dwightlathan77](https://wordpress.org/support/users/dwightlathan77/)
 * (@dwightlathan77)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/participant-relationhsips/#post-4002655)
 * Yes, I was thinking the same thing, but thought it would be a good feature to
   mention. One I may be thinking myself out of.
 * The need to have a generalized approach with any relation does make it much more
   difficult to implement. A solution might be to provide a multi-value Relation
   type Form Element that defines 2 selects: one for the participant list and another
   for the relation. I suppose you would also need to decide if you wanted data 
   integrity, and I wonder if the typical administrator would be able to generate
   meaningful reports based on the fields. The typical use may be limited to hyperlinks
   to the related Participants, and probably one-way links at that due to processing
   needs.
 * When I get to the point I need to implement this feature I plan on using your
   first and third suggestion by using ajax to populate a multi-value select with
   the relation’s id and name, then overlay it with a jquery autocomplete. That 
   way I can leave your plugin unmodified.
 *  Plugin Author [xnau webdesign](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/participant-relationhsips/#post-4002698)
 * Sounds like you know your way around Javascript. It’s definitely the best way
   to go.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Participant relationhsips’ is closed to new replies.

 * ![](https://ps.w.org/participants-database/assets/icon-256x256.jpg?rev=1389807)
 * [Participants Database](https://wordpress.org/plugins/participants-database/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/participants-database/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/participants-database/)
 * [Active Topics](https://wordpress.org/support/plugin/participants-database/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/participants-database/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/participants-database/reviews/)

## Tags

 * [Relationship](https://wordpress.org/support/topic-tag/relationship/)

 * 5 replies
 * 2 participants
 * Last reply from: [xnau webdesign](https://wordpress.org/support/users/xnau/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/participant-relationhsips/#post-4002698)
 * Status: not resolved