3

We have a small but significant number of contacts with trailing spaces at the end of name fields (both first and last) as well as address fields (have found city name and postal code thus far). This has been going on for at least a year at a low rate, but perhaps picked up recently and is affecting more than 1% of new contacts. It has happened via webforms, via profiles used as snippets and profiles in event registrations and different instances of each, so it doesn't seem to be coming from any particular place.

Has anyone else seen anything like this? I can't get a search that works to find these, but they are pretty easy to see by scanning new contacts and looking for spaces before the comma that separates last from first names.

Update: In the last ten days, we've had a big increase in these spaces appearing. 12% of 375 recent new contacts had this issue in their last name (and some of those had it in other fields as well). This is much more than we've seen in the past, which suggests it is not actually people doing it themselves (unlikely that there is a sudden explosion in space bar use at the end of fields)

5
  • As a general comment I have seen this on all types of internet web forms when someone copy and pastes from something they are viewing in a browser, like another web page. Sometimes it puts in tabs at the beginning too.
    – Demerit
    Commented Jun 6, 2020 at 1:49
  • What version of CiviCRM and Drupal are you using? Always helpful to put that up top. This sounds like it might be folks who are using autofill for forms in Chrome, Firefox etc. Or Lastpass, similar password management utilities. For your webforms, I imagine you could set up something using a regular expression to get rid of the trailing spaces on ubmission. Commented Jun 8, 2020 at 18:14
  • 5.24.6 on Drupal 7.70. Autofill is definitely something we thought of, but unclear what exactly the problem might be there.
    – Lars SG
    Commented Jun 8, 2020 at 22:19
  • We have dozens of people a day filling out Civi event forms and webforms, and also have a significant number of spaces after people's names, and sometime after other fields. I feel pretty certain at this point that most of it is people actually entering spaces after their names. I've seen people that work here do it in person! It makes no sense whatsoever, but some people just press the space key after they type something. As suggested above, I think it could also be cut and paste sometimes.
    – desierto
    Commented Jun 9, 2020 at 20:40
  • 1
    In the last ten days, we've had a big increase in these spaces appearing. 12% of 375 recent new contacts had this issue in their last name (and some of those had it in other fields as well). This is much more than we've seen in the past, which suggests it is not actually people doing it themselves (unlikely that there is a sudden explosion in space bar use at the end of fields).
    – Lars SG
    Commented Jun 22, 2020 at 15:49

1 Answer 1

1

I checked with Dev and recommendation is to handle trailing spaces in the form layer (rather than in the API) -> so to start here is the fix for D7WFC -> https://github.com/colemanw/webform_civicrm/pull/319

If you see more of these in future -> let me know and we'll track down the next form entry point e.g. profiles.

1
  • KarinG & @Coleman have put trailing space removal into webform-civicrm, thanks!
    – Lars SG
    Commented Jul 6, 2020 at 22:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.