Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 4 of 4

Thread: Required Field

  1. #1
    Join Date
    Jan 2008
    Location
    Torquay - UK
    Posts
    13

    Required Field

    I want to make sure that a user enters something in all input boxes.

    --Get Name
    Name = Input.GetText("Input1");
    TextFile.WriteFromString("myfile.txt", "\r\nName:", true);
    TextFile.WriteFromString("myfile.txt", Name, true);
    --Get Address
    Address = Input.GetText("Input2");
    TextFile.WriteFromString("myfile.txt", "\r\nAddress:", true);
    TextFile.WriteFromString("myfile.txt", Address, true);
    --Get Telephone Number
    TelNo = Input.GetText("Input3");
    TextFile.WriteFromString("myfile.txt", "\r\nTelNo:", true);
    TextFile.WriteFromString("myfile.txt", TelNo, true);

    --Go to Thank You page
    Page.Jump("page2");

    Thanks in advance

  2. #2
    Join Date
    Aug 2003
    Posts
    2,427
    Something along the lines of -

    Code:
    str_name = Input.GetText("Input1");
    str_address = Input.GetText("Input2");
    str_telno = Input.GetText("Input3");
    	
    if (str_name~="") and (str_address~="")and (str_telno~="") then
    Page.Jump("Page2")
    end
    obviousy with your other code to write the strings out to file added

  3. #3
    Join Date
    Jan 2008
    Location
    Torquay - UK
    Posts
    13

    My Way

    Thanks for your reply I did actually find a way to do what I wanted yesterday, giving myself a migraine in the process, but your method looks much less cumbersome. I am learning all the time and appreciate your help very much.

    I have attached my code for you to view if you wish.
    Attached Files

  4. #4
    Join Date
    Aug 2003
    Posts
    2,427
    Quote Originally Posted by Wellswood View Post
    I did actually find a way to do what I wanted yesterday, giving myself a migraine in the process
    Best way by far although every now and then you (as in one that is) just hit a brick wall.

    Personally speaking the only way I can learn anything is by actually *doing*, manuals are of no use to me at all

Similar Threads

  1. Hide/unhide edit field and button
    By KVanhuffel in forum Setup Factory 7.0
    Replies: 2
    Last Post: 09-21-2007, 03:16 AM
  2. help: put a string in a edit field..?
    By Michka88 in forum Setup Factory 7.0
    Replies: 2
    Last Post: 01-18-2005, 02:26 PM
  3. typed characters in edit field stay into the field
    By ovm in forum AutoPlay Media Studio 4.0
    Replies: 6
    Last Post: 09-01-2003, 11:13 PM
  4. Caption above edit field
    By Laslie Toth in forum Setup Factory 6.0
    Replies: 1
    Last Post: 04-22-2002, 01:58 PM
  5. Default text in edit field - Multiple edit screen
    By Romahe in forum Setup Factory 6.0
    Replies: 1
    Last Post: 12-18-2001, 01:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts