Re: enhancing prompt() functions
- Posted by jimcbrown (admin) Sep 15, 2011
- 1051 views
mattlewis said...
I'm not sure why we'd need to do all of that. Using the example above, it might look like:
Enter username: [Steve Jones]Then, if you simply press enter, it's as though you entered Steve Jones. Otherwise, whatever the user enters is returned.
Matt
Hmm. I guess that's fine.
The user couldn't edit the default string (e.g. change it from "Steve Jones" to "Steve Jone") but would either have to use it as-is or type in the whole thing from scratch, but that might not be a problem.