Populate Select Based On Relationship Data

Support General Populate Select Based On Relationship DataResolved

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #24911
    MartinMartin
    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.

    #24919
    Long NguyenLong 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
    MartinMartin
    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 NguyenLong 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
    MartinMartin
    Participant

    Looks simple enough. Thanks Long.

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