• Resolved ulf18273

    (@ulf18273)


    Hello Stephen,

    I received already a couple of error reports from people signing up and they all received the error message “Invalid Characters in Signup Item! Please try again.”.
    After some investigation I found that they copied text into the detail field which contains a space at the end. So they entered
    “ChickenSalad ” instead of “ChickenSalad”. A similar error will be thrown btw if the First or Last Name also contains a space at the end.

    I am not sure if removing these spaces could potential break anything, so leave it up to you to decide if you want to strip the blanks or change the regex rule in check_allowed_text() to allow a space at the end.

    But this is definitely an annoyance.

    Thanks,
    Ulf

    https://www.ads-software.com/plugins/pta-volunteer-sign-up-sheets/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author DBAR Productions

    (@dbar-productions)

    Yes, the validation on the text fields is not ideal, and perhaps something I should revisit at some point. Originally it was a simple regex rule, but then that made it not work with certain special characters or other languages, and it seemed the best solution (at the time) was to use the WordPress sanitize_text function and compare the results of that to what they entered. However, I didn’t strip white space from the input when comparing, and the sanitize_text function does strip extra white spaces, so the type of errors that have been reported to you will happen until I rework that function.

    I will try to remember to put in a fix for that in the next release. The other option is to not validate at all, and simply sanitize the text field before saving it.

    I will chime in here as I, and two of my client school PTAs, have had repeated after repeated issue with this problem. It wasn’t a problem last school year when we started using PTA sign up sheets, but this year, every time anyone tries to create a sign-up sheet, I get emails that they can’t save the form due to “invalid characters in the title field.” I had previously written to you about it, too (https://www.ads-software.com/support/topic/invalid-characters-in-title-field).

    I will +1 or shamelessly BEG you to fix this in an upcoming (soon!) release. I’m getting contacted often – every time a new volunteer tries to create a form.

    I would recommend programatically escaping the characters, rather than dropping the validation; since so many different volunteers work on these forms (and I’m sure that’s the case for most people using your plugin) it’s hard to train everyone that’s using it, and there *will* be people who do insert crazy stuff. But if you escape out the normal special characters that need to be used, AND put at the top of the form (or in the validation error message) which characters are permitted and/or not, 99% of this problem will go away ??

    BEGGING. Please please.

    Kym

    Plugin Author DBAR Productions

    (@dbar-productions)

    I have already added the code to trim text inputs (strip spaces before or after the text input). There were some new features another contributor sent to me, and since I had to work those into the code, I fixed the input text validation while I was at it.

    It will be released later today once I do a bit more testing on everything.

    Wonderful wonderful news!! Thank you! ??

    Has this been resolved, I have had parents complaining about this today. I’m running version: Version 1.12.0 – I just updated but I didn’t see it in your version fixes. I also notice that this plugin is now saying it’s not been tested with my current version of wordpress 4.4 – Thank you

    Plugin Author DBAR Productions

    (@dbar-productions)

    Yes, that was fixed in version 1.12.0 by adding some code to strip out any extra spaces in the inputs before validating. Not sure why the 1.12.0 entry is not showing up in the changelog here at www.ads-software.com, but if you look at the readme.txt file in the plugin itself, the notes are there.

    Yes, it works just fine with version 4.4 of WordPress.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Invalid Characters in Signup Item! Please try again. due to spaces’ is closed to new replies.