---
title: "The Screen script"
canonical: "https://support.appfire.com/space/PSJC/1839235307/The%20Screen%20script"
format: markdown
---
> Macro (aura-html)


## How to create a screen

Input fields are created using a specialized script library with dedicated functions for each field type. See [The input type functions](https://appfire.atlassian.net/wiki/spaces/PSJC/pages/1839235499) page for detailed documentation on each input creation function.

## Screen customization functions

Beyond adding input controls, Forms and Wizards offers additional functions to control how your screen is displayed. These specialized functions allow you to customize key elements of the user interface.

- To customize the screen title that appears at the top of your screen, use [BA_setActionTitle](https://appfire.atlassian.net/wiki/spaces/PSJC/pages/1839235434).
- To change the text displayed on the submit button (default is *Execute*), use [BA_setExecuteButtonText](https://appfire.atlassian.net/wiki/spaces/PSJC/pages/1839235467).

## Input fields example script

This script demonstrates all available input field types in Forms and Wizards, organized by category, with consistent configuration options. The script:

- Creates common variables for field configuration.
- Implements all input field types with appropriate parameters.
- Customizes the screen title and execute button text.

```
// Common configuration variables
boolean isDisabled = false;     // Controls whether fields are interactive or read-only
boolean isRequired = true;      // Makes fields mandatory for form submission
string badesc = "This is a description";  // Default help text for all fields

//--- Content Fields ---//
BA_createHtmlContent("<h1>HTML Title Text</h1>");  // Displays formatted HTML content

//--- Single Value Fields ---//
BA_createInput("input", "asdf", isDisabled, isRequired, badesc);  // Simple text input with default value "asdf"
BA_createTextArea("ta", "some text", isDisabled, 3, isRequired, badesc);  // Multi-line text area with 3 rows
BA_createSingleCheckbox("cbx", true, isDisabled, isRequired, badesc);  // Checkbox pre-checked (true)
date d = currentDate();  // Gets current date for date pickers
BA_createDatePicker("date", d, isDisabled, isRequired, badesc);  // Date selection field
BA_createDateTimePicker("datetime", d, isDisabled, isRequired, badesc);  // Date and time selection field
BA_createUserPicker("userpicker", "admin", isDisabled, isRequired, badesc);  // User selection with default "admin"

//--- Multiple Value Fields ---//
BA_createFileUpload("File Upload", isDisabled, isRequired, badesc);  // Allows uploading one or more files

//--- Option Selection - Single Value ---//
BA_createSelectList("Select List", {"a", "b"}, "a", isDisabled, isRequired, badesc);  // Dropdown with options "a" and "b", "a" selected
BA_createRadioGroup("Radio Group", {"a", "b"}, "a", isDisabled, isRequired, badesc);  // Radio buttons with same options

//--- Option Selection - Multiple Values ---//
BA_createMultiSelectList("Multi Select List", {"a", "b", "c"}, {"a", "b"}, isDisabled, isRequired, badesc);  // Dropdown allowing multiple selections
BA_createCheckboxGroup("Checkbox Group", {"a", "b", "c"}, {"a", "b"}, isDisabled, isRequired, badesc);  // Multiple checkboxes

//--- Screen Customization ---//
BA_setActionTitle("Multiple options, multiple selectable values");  // Sets the screen title
BA_setExecuteButtonText("Example");  // Changes the submit button text from "Execute" to "Example"
```