You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a short answer on a form, the database restriction for saving is 255 characters but the max length of the input is set as 500. This allows users to enter more than the 255 characters which is seen as a valid entry so form submission isn't stopped. However, when the data is saved to the database, the database triggers a “String or binary data would be truncated” error. The user believes everything is ok, but no data is stored in the database.
Reproduction
Create a form that writes to the database
Add a short answer field
Fire up the form
Enter more than 255 characters into the short answer field
Submit the form
Expected result
If the form is unable to save the data, would expect form validation or data input restrictions to ensure that the form isn't submitted
No, I'm afraid not. This update was made in Forms 8.7.3 by the looks of it, so only versions beyond that will have the fix in. I think here though you could apply it yourself, by updating the maxlength setting for the text box field in your theme.
When using a short answer on a form, the database restriction for saving is 255 characters but the max length of the input is set as 500. This allows users to enter more than the 255 characters which is seen as a valid entry so form submission isn't stopped. However, when the data is saved to the database, the database triggers a “String or binary data would be truncated” error. The user believes everything is ok, but no data is stored in the database.
Reproduction
Create a form that writes to the database
Add a short answer field
Fire up the form
Enter more than 255 characters into the short answer field
Submit the form
Expected result
If the form is unable to save the data, would expect form validation or data input restrictions to ensure that the form isn't submitted
This item has been added to our backlog AB#5507
The text was updated successfully, but these errors were encountered: