Buttons:
Buttons is a container element holding a list of Button elements.
  - Buttons:
    - <button name>:
      <button properties>: <properties values>
      ...
The Button element plays a very important role for building the application with the following functions:
  • Link to other pages
  • Popup page components
  • Define which state object is passed to the popup component
  • Define which properties are returned from popup
  • Properties

    #
    Specify the <button name> followed by a list of button properties:
    <button name>
    The name displayed on the button.
    click
    Trigger javascript function upon button click.  Same as the onClick property of the HTML element.

    Example
              () => goBack()

    Refer to the YAML CRUD example for details.
    href
    URL of the page linking to.
    pop
    Trigger a popup component with the following properties:
    form: <popup component name>
    title: title passed to the popup form
    update:
        <parent form field>: <popup form field>

    The update property defines which popup form field is assigned back to the parent form field when the popup form is closed.

    Example
        pop:
            form: pagepopup
            title: Call by parent Modal
            update:
               _inputname: name

    Refer to the YAML Modal example.
    return
    The name of the field(s) to be returned to the parent form.

    Example
        return: name

    Refer to the YAML Modal example.

    Example

    #
      - Buttons:
        - buttonName:
          href: 'https://u.team'
    The above scripts generate a button that forwards to the u.team site.

    Visit example.u.team/yamlmodal to try out the live examples.