details/item text

Viewing 3 reply threads
  • Author
    Posts
    • #15016
      Carl L
      Participant

      We are running into two issues with the ‘details text’ or ‘item you are bringing’ field.

      1. We are sometimes asking volunteers for more information than you anticipated when you created the plugin, so the volunteers are getting an error message when they try to submit a long response for the details. The error message does not tell them that the field is too long. In the distributed code, the field ‘item’ is set to varchar(100). I changed it via phpAdmin to varchar(300). I am not familiar with details of how plugins update. Will I need to reapply this modification when the plugin is updated?

      2. When a submission error occurs, the submitted ‘item’ text is reloaded, but any special characters such as apostrophes are escaped with a \ and each failed submission attempt adds another \. This is a minor inconvenience, but probably can be handled in a future release.

      Thanks for a great plugin.

    • #15020
      Stephen Sherrard
      Keymaster

      Thanks for reporting the issues.

      Regarding #1, the database tables are set up during activation, using the WordPress dbDelta command, so it will only modify the tables if it detects a change from what is in my code versus the existing table format. Not sure if it will downgrade back to a smaller varchar size or not without testing. I know that I have increased the size of some fields in the past, and it has detected that change and updated the tables accordingly, but I haven’t tried going back the other way (making fields smaller).

      Those fields were never intended for storing large amounts of text when I first programmed it, since they were mostly used for school staff lunches to indicate a specific dish the volunteer was providing. I could probably bump up the size to what you have it set to in the next release without negatively affecting any current installs.

      #2 is easy enough to fix with stripslashes. Thanks for the heads up on that.

    • #15024
      Carl L
      Participant

      Thank you. I understand that you were only expecting a short response when you built the plugin. We need to ask the volunteers a couple questions, and by the time that they type a sentence they have hit the limit. I realized that it was pretty easy for a volunteer to hit the limit of 300 char, so I changed my limit to varchar(500). This post is 403 characters. The varchar storage is pretty efficient.

    • #15083
      Stephen Sherrard
      Keymaster

      Bumped up to Varchar(300) in version 2.0.3
      Posted form fields will also have slashes stripped when redisplayed after error.

Viewing 3 reply threads
  • The topic ‘details/item text’ is closed to new replies.