Skip to content

Select Input Options #1016

@minimoogclone

Description

@minimoogclone

How do I include a Resouce Ojbect Collection for the keys and values used for HTML 'options' tags of 'select' inputs?

For example, I have an HTML form to edit an 'Author', and wish to set the 'Country' select input by choosing from a list of 'Countries' found in my JSONAPI payload. Where would the Countries Resouce Object Collection be found within the document?

Do I use a different endpoint and make a second request? Is there a way I can instead include them in the 'included' member to eliminate the second request?

The ids for 'countries' resources would not appear in the primary data or related resources as 'full linkage'. Would this be allowable?

The JSONAPI specs state that any Resource Object Id under the 'included' member must also be referenced in the primary data, or related resources. All but 1 of my 'countries' Resource Objects found in the collection will have an ID reference at one given time, so it may go against the specification, and I'm not clear on how to proceed.

An example would be much appreciated.

Many thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy