I need to allow a user to insert a URL into a text field (using copy+paste), as well as inserting a list of URLs. This can be done into same field or to be separated into two different experiences. At the moment I use regular text field which expands in case the user insert multiple URLs. Any ideas?
1 Answer
Same field.
"Two fields" strategy require either a:
- radio button" to pick "single URL" or "multiple URL", which is an extra step
- If you just put both fields on the UI it will create noise. Also for the mind is trivial to pick where to put a single URL because in theory it also "fits" into the multiple field.
However "same field" strategy IMO does not have a major disadvantage, you could auto grow the field if it contains several URLS. Also if you want to go to the next level, I suggest you that when the paste event happen, separate the URLS with a blank line, so text field should look like:
http://google.com/?987jkhjkhjhjkhjjkhkh
http://yahoo.com/?987jkhjkhjhjkhjjkhkh
UI should be something like:
URL(s): [ ]
The input could have a tooltip with an explanation that you could introduce one or more URLS separated by either comma or blank line, your code internally make it homogeneous to all the URL be separated by blank line, just for usability purposes you allow to paste it separated by comma.