Custom Fields
Re-Envisioned
Support General Populate Select Based On Relationship Data

  • Creator
    Topic
  • #24911
    Resolved Martin
    Participant

    Another question about populating fields. I have a CPT called Job. This is set to have Relationships to 2 different user types (Client and Sitter). All that is fine.

    I’d like to be able to populate some Selection Advanced fields based on values from the Relationships. For instance I’d like one SA field to be filled with a list of all instances of the pet_name field (in a cloned group) for the Client user type. Another SA field is to be populated by all users of type Sitter connected to the Job.

    How would I go about doing this?

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #24919
    Long Nguyen
    Moderator

    Hi Martin,

    I’m afraid there are no settings or options to populate a field value base on another field value. You can use the extension MB Conditional Logic to show/hide a field base on the relationship value.

    #24921
    Martin
    Participant

    OK. Not even a coded option to override the options in a list?

    As another followup question – is there a way to return a list of the added relationships for other purposes. I’ll need to create a button that sends an email to all users added by relationship to a post so will need to get the list.

    #24930
    Long Nguyen
    Moderator

    Hi,

    Not yet. For the second question, you can get the list of the relationship objects connected by following the documentation https://docs.metabox.io/extensions/mb-relationships/#getting-connected-items.

    #24933
    Martin
    Participant

    Looks simple enough. Thanks Long.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.