Link to home
Start Free TrialLog in
Avatar of i7m
i7mFlag for Jordan

asked on

Displays a dialog box containing multiple input fields..

in Delphi XE4 iOS Firemonkey mobile Application I need to show a dialog box with multiple input fields, here is my code, it always shows the dialog box with ONE input field

const
     S : array [1..2] of string = ('ContactName' , 'ContactNumber');
var
     V : Array [1..2] of string;
begin
     if InputQuery('Contact Details', S, V, nil) then
     begin
          // Do something ...
     end;
end;

Open in new window



I tried also

if InputQuery('Contact Details', S, V) then {removed the last parameter}

Open in new window


I got same result.

any Ideas?

Thanks in advance.
Avatar of Sinisa Vuk
Sinisa Vuk
Flag of Croatia image

Try this one:
var
  Vars : array of String;
begin
  SetLength(Vars,2);
  //default
  Vars[0] := '';
  Vars[1] := '';

  if InputQuery('Contact Details', ['ContactName' , 'ContactNumber'], Vars, nil) then
  begin
    ....

Open in new window


http://docwiki.embarcadero.com/Libraries/XE2/en/Vcl.Dialogs.InputQuery
Think that string array must start from 0 index (Array [0..1] of...)
Avatar of i7m

ASKER

Tried and got same result.

It displayed the the array item [1] only
Is this code works on Win platform? Could be Firemonkey issue.
Avatar of i7m

ASKER

Yes Works Okay on Win32 Platform
Untitled.png
ASKER CERTIFIED SOLUTION
Avatar of Sinisa Vuk
Sinisa Vuk
Flag of Croatia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of i7m

ASKER

I posted it as a bug on Embarcader's Quality Center. and waiting their. Thanks for your help.