Home›Forums›Feature Requests›Volunteer Sign-Up Sheets – Feature Requests›details/item text
- This topic has 3 replies, 2 voices, and was last updated 7 years, 9 months ago by Stephen Sherrard.
-
AuthorPosts
-
-
March 12, 2017 at 4:56 PM #15016Carl LParticipant
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.
-
March 12, 2017 at 5:19 PM #15020Stephen SherrardKeymaster
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.
-
March 13, 2017 at 6:21 AM #15024Carl LParticipant
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.
-
March 17, 2017 at 3:41 PM #15083Stephen SherrardKeymaster
Bumped up to Varchar(300) in version 2.0.3
Posted form fields will also have slashes stripped when redisplayed after error.
-
-
AuthorPosts
- The topic ‘details/item text’ is closed to new replies.