Author Topic: Automatic input of http:// in link field reduces usability  (Read 941 times)

Offline John.K

  • I post occasionally
  • **
  • Posts: 75
  • Karma: 5
  • CiviCRM version: 4.x
  • CMS version: Drupal 7
  • MySQL version: 5.x
  • PHP version: 5
On CiviCRM profiles, where there is a website or link field, clicking into the field automatically inserts: http://
into the field.

I'm sure this is done with the best intention, but it is not good for usability. If someone clicks in to the field and then pastes a link, you end up with:
http://https://mysocialmedialink.com

The above (invalid URL) passes validation, whereas www.mysocialmedialink.com does not, giving the not-very-useful message: 'Enter a valid Website.'

Proposed changed

- Do not auto-fill the fields with http://
- Improve the validation error message to say 'Please include the http:// or https:// at the beginning of the URL'. Or something similar.

Next steps

I'd appreciate your feedback on this before I go ahead and create an issue in the tracker.

Offline JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: Automatic input of http:// in link field reduces usability
« Reply #1 on: May 19, 2015, 08:05:34 am »
Alternatively, validation could detect and strip out the double protocol specifier?  Though it's probably if it worked in reverse - don't add http:// until you're validating the field, and then validation can add it if it's missing.
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

Offline John.K

  • I post occasionally
  • **
  • Posts: 75
  • Karma: 5
  • CiviCRM version: 4.x
  • CMS version: Drupal 7
  • MySQL version: 5.x
  • PHP version: 5
Re: Automatic input of http:// in link field reduces usability
« Reply #2 on: May 19, 2015, 08:38:50 am »
I wondered about adding it in during the validation, but I wasn't sure about playing around with people's inputs too much like that. But I suppose, if it automatically entered http:// then the website itself would redirect to https if required.

Offline Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Automatic input of http:// in link field reduces usability
« Reply #3 on: May 19, 2015, 10:07:04 am »
John - I agree that this is an annoying usability issue. How about removing the automatic input, and checking for http:// or https:// in the field validation. If missing, provide an improved validation error message.
Protect your investment in CiviCRM by  becoming a Member!

Offline Fabian_SYSTOPIA

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 3
  • CiviCRM version: 4.3.x, 4.4.x
  • CMS version: Drupal 7.x
  • MySQL version: 5.4.10
  • PHP version: 5.4.10
Re: Automatic input of http:// in link field reduces usability
« Reply #4 on: May 19, 2015, 11:32:08 pm »
On of our customers also had the problem when using copy & paste.

In addition, there are some restricted characters such as the German "Umlaute" (e.g. ü or ä). For a couple of years now those can be used in website urls however, the validation wouldn't accept it.

In short: +1 for removing the http:// autofill and or adapting it - if possible please also consider adapting the validation so it is less strict with special characters.

Offline John.K

  • I post occasionally
  • **
  • Posts: 75
  • Karma: 5
  • CiviCRM version: 4.x
  • CMS version: Drupal 7
  • MySQL version: 5.x
  • PHP version: 5
Re: Automatic input of http:// in link field reduces usability
« Reply #5 on: May 20, 2015, 12:54:05 am »
Thanks for the feedback everyone. I've created an issue here to take this forward: https://issues.civicrm.org/jira/browse/CRM-16531

Offline John.K

  • I post occasionally
  • **
  • Posts: 75
  • Karma: 5
  • CiviCRM version: 4.x
  • CMS version: Drupal 7
  • MySQL version: 5.x
  • PHP version: 5
Re: Automatic input of http:// in link field reduces usability
« Reply #6 on: May 22, 2015, 01:48:25 am »
There's an issue about umlauts specifically here, as it turns out:  https://issues.civicrm.org/jira/browse/CRM-15975

Offline Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: Automatic input of http:// in link field reduces usability
« Reply #7 on: May 24, 2015, 02:54:41 pm »
John - there's a fix already submitted for emails: CRM-16313. Some duplication between these three tickets?

* https://issues.civicrm.org/jira/browse/CRM-15975
* https://issues.civicrm.org/jira/browse/CRM-16313
* https://issues.civicrm.org/jira/browse/CRM-16531