# Dialogs with fields for Windows

**URL:** <https://the.fmsoup.org/t/dialogs-with-fields-for-windows/5308>\
**Category:** MBS Plugins\
**Tags:** plugin, windows, dialog, mbs\
**Created:** [February 26, 2026, 7:01pm UTC](https://the.fmsoup.org/t/dialogs-with-fields-for-windows/5308 "2026-02-26T19:01:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MonkeybreadSoftware](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/monkeybreadsoftware/32/361_2.png) [@MonkeybreadSoftware](https://the.fmsoup.org/u/MonkeybreadSoftware)\
**Post date:** [February 26, 2026, 7:01pm UTC](https://the.fmsoup.org/t/dialogs-with-fields-for-windows/5308/1 "2026-02-26T19:01:58Z")

</div>

We have our [dialog](https://www.mbsplugins.eu/component_Dialog.shtml) functions in [MBS FileMaker Plugin](https://www.monkeybreadsoftware.com/filemaker/) to quickly show a dialog in a calculation. Usually to show a custom dialog in FileMaker at any time to quickly report something to the user or to quickly ask a question with yes or no.

For example we can just ask with a Let statement for whether we should delete a file:

```php
Let ( 
[
    _ = MBS("Dialog.Reset") ;
    _ = MBS("Dialog.SetDefaultButton" ; "Yes") ;
    _ = MBS("Dialog.SetOtherButton" ; "No") ;
    _ = MBS("Dialog.SetAlternateButton" ; "Cancel") ;
    _ = MBS("Dialog.SetMessage" ; "Delete the old file?") ;
    _ = MBS("Dialog.SetWindowTitle" ; "Backups done") ;
    _ = MBS("Dialog.Run") ;
    button = MBS("Dialog.GetButtonPressed")
] ;
    // 0 -> Yes, 1 -> No, 2 -> Cancel
    button
)

```

A few years ago we added a few helper functions for macOS to add some text fields to ask a question and get some data. For example we may ask:

- The new file name for renaming a file

- Ask for user name and password for new account

- Ask user for an email, phone number or some other quick value

- Ask for some initial values to create a new record.

- Enter a approval code like TOTP

If someone needs to pick something from a list, you better use [ListDialog](https://www.mbsplugins.eu/component_ListDialog.shtml) functions.

For the fields, let's make a little script to ask the user for an user name and password with two fields:

```php
Set Variable [$r ; Value: MBS( "Dialog.Reset" )]
Set Variable [$r ; Value: MBS( "Dialog.SetAlternateButton" ; "Cancel" )]
Set Variable [$r ; Value: MBS( "Dialog.SetDefaultButton" ; "Create" )]
Set Variable [$r ; Value: MBS( "Dialog.SetInformativeText" ; "To quickly add an user name and optional a password. If no password is provided, we generate one." )]
Set Variable [$r ; Value: MBS( "Dialog.SetMessage" ; "Create new user account for My Solution" )]
Set Variable [$r ; Value: MBS( "Dialog.AddField"; "Account name:"; ""; "Name" )]
Set Variable [$r ; Value: MBS( "Dialog.AddField"; "Initial password:"; ""; "Password" )]
Set Variable [$r ; Value: MBS( "Dialog.SetWindowTitle" ; "Create Account" )]
Set Variable [$result ; Value: MBS( "Dialog.Run" )]
Set Variable [$name ; Value: MBS( "Dialog.GetFieldText"; 0)]
Set Variable [$pass ; Value: MBS( "Dialog.GetFieldText"; 1)]
Show Custom Dialog [$result & ¶ & $name & ¶ & $pass]

```

![](https://www.mbsplugins.de/image/WindowsFieldDialog.png)

Or as Let statement:

```php
Let(
	[
		r = MBS( "Dialog.Reset" ) ;
		r = MBS( "Dialog.SetAlternateButton" ; "Cancel" ) ;
		r = MBS( "Dialog.SetDefaultButton" ; "Create" ) ;
		r = MBS(
			"Dialog.SetInformativeText" ;
			"To quickly add an user name and optional a password. If no password is provided, we generate one."
		) ;
		r = MBS( "Dialog.SetMessage" ;
			"Create new user account for My Solution" ) ;
		r = MBS( "Dialog.AddField" ;
			"Account name:" ;
			"" ; 
          "Name" ) ;
		r = MBS( "Dialog.AddField" ;
			"Initial password:" ;
			"" ;
			"Password" ) ;
		r = MBS( "Dialog.SetWindowTitle" ;
			"Create Account" ) ;
		$result = MBS( "Dialog.Run" ) ;
		$name = MBS( "Dialog.GetFieldText" ; 0 ) ;
		$pass = MBS( "Dialog.GetFieldText" ; 1 )
	] ;
	$result
)

```

As you see we can just evaluate a Let to get the variables filled. This is very convenient to show a dialog at the spot in some calculation.

If you need more, check out the example on how to make a dialog from a FileMaker layout and put many more controls on the dialog.
