Sub Button1_Click
dialog.Title = "Insert some text"
Dim input As B4XInputTemplate
input.Initialize
input.lblTitle.Text = "Testing"
input.RegexPattern = ".+" 'require at least one character
Wait For (dialog.ShowTemplate(input, "OK", "", "CANCEL")) Complete (Result As Int) 'error
If Result = xui.DialogResponse_Positive Then
Log("This was the input text " & input.Text)
End If
End Sub