## Implementing guiInit

The guiInit function is called during initialization of the application and provides the form definition. In this section the calling syntax, arguments and return values will be discussed, followed by a small example.

### Syntax

function payload = guiInit(metaData)
...
end

def gui_init(meta_data: dict) -> dict:
...


#### Arguments

metaData:

Meta data describing the client session.

Struct/dict with fields:

• session_id: unique ID for the session, can be used to differentiate between multiple instances of the application
• namespace: package name of the application

In the guiInit function, form is defined by filling the form field of the payload. The payload is then sent to the front-end in order to present the form to the user.

payload:

Return value with the form definition.

Struct/dict with fields:

• form: a simian.gui.Form
• navbar (optional): struct/dict with fields:
• logo (optional): image source reference (anything that can be put in HTML <img src="..." />
• title (optional): HTML string
• subtitle (optional): HTML string