multiple text entries

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
KennyR
Posts: 256
Joined: Thu Jan 19, 2012 4:25 am

multiple text entries

Post by KennyR » Sat Jan 21, 2012 4:23 pm

Hello again everyone! Sorry I feel like I am burning up the boards with stupid questions but here it goes anyway...

I have been searching the forum and help files but can't seem to find anything about keeping text entries from being overwritten when a new entry is made. What I mean is this...I have a card that allows a user to enter a First name, Last Name and some text. Then when the user saves the entries ,it puts those entries into another scrolling text field. This works great, but what happens is when they make another entry and save it, the prior text is overwritten by the new text. Is there a way that when the text of the user is submitted, the program determines if there is already text in the field and places it below the prior entry instead of overwriting it? I would like it to look like this for multiple entries....

(Entry #1)
First Name Last Name
Text of the user

(Entry #2)
First Name Last Name
Text of the user

and so on....

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: multiple text entries

Post by Dixie » Sat Jan 21, 2012 4:42 pm

Kenny...

Try something like this...

Code: Select all

on mouseUp
   put fld "firstName" & tab & fld "lastName" & cr after fld 3
end mouseUp
This will put your new entry into a new line in the 3rd field where you are collecting the names...

Hope it helps

Dixie

KennyR
Posts: 256
Joined: Thu Jan 19, 2012 4:25 am

Re: multiple text entries

Post by KennyR » Sat Jan 21, 2012 5:29 pm

Thank you for your response, but this does not solve this issue with a new text entry being overwritten.... I think your code is for spacing out the entries to resemble a certain format....that I have figured out....my problem is after the first entry is made by the user i.e. "First Name, Last Name, some text" the entries are put into another scrolling text field, which is fine, but when the user goes to make another text entry and save that one, it overwrites the last entry. I would like to have the previous entry preserved on its own line(s) and a new entry placed below it....I hope I have not made this too confusing...

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10320
Joined: Wed May 06, 2009 2:28 pm

Re: multiple text entries

Post by dunbarx » Sat Jan 21, 2012 7:22 pm

Hi.

I assume you are putting the new text "into" your target field. Read up on this as well as the "after" keyword in the dictionary. And ALL its "see also" terms.

These gadgets are among the most useful and powerful in the language if you are fooling around with text. They form the foundation of what is know as "chunking". Nobody has ever made better tools.

Craig Newman

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: multiple text entries

Post by Dixie » Sat Jan 21, 2012 7:23 pm

Kenny...

That's 'exactly' what that script does !... it places what has been entered in fld 1 & fld 2 on a new line in fld 3... look at what is in the line... a carriage return to put it on a new line in fld 3, and putting it after whatever else is in fld 3

be well

Dixie

KennyR
Posts: 256
Joined: Thu Jan 19, 2012 4:25 am

Re: multiple text entries

Post by KennyR » Sat Jan 21, 2012 9:59 pm

Thanks guys...I read about the keywords and it fixed the issue....also after looking at Dixie's previous post I now realize what she was saying....I didn't understand what the code was actually doing...well I guess you gotta learn somehow! Thanks again for everyone's help!

Post Reply