Version:

    Youtube URL

    Schema:

    {
      "type": "object",
      "properties": {
        "type": {"type": "string", "pattern": "^form-field$"},
        "id": {"type": "string", "pattern": "^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$"},
        "machine_name": {"type": "string"},
        "data": {
          "type": "object",
          "properties": {
            "uid": {"type": "string","pattern": "^form-youtube-embed$"},
            "title": {"type": "string"},
            "value": {"type": "string"}
          }
        }
      },
      "required": ["id", "type", "data"]
    }
    

    Example output:

    Given "Youtube URL" form element on a component set up like so

    And used on Node layout canvas like so

    JSON:API output for this form field will be this:

    
     
    {
      "type": "form-field",
      "id": "1322982e-9bbe-471a-b840-23d2b5fe3631",
      "machine_name": "youtube-url",
      "data": {
        "uid": "form-youtube-embed",
        "title": "Youtube URL",
        "value": "https://youtu.be/dQw4w9WgXcQ?si=MQ6Hl49U0PSEPKtz"
      }
    }

     

    DX8 knowledge base icon

    Frequently asked questions

    Get instant answers to common questions. Available online 24/7.

    Find answers

    Raise a ticket icon

    Raise a support ticket

    To raise a ticket, sign into Acquia Cloud and select Help in the top menu.

    Raise support ticket

    Acquia

    Copyright © 2020 Acquia, Inc. All Rights Reserved. Drupal is a registered trademark of Dries Buytaert.