Support Article
Required field validation displays on clicking Delete row button
Summary
Required field validation message displays on clicking the 'Delete row' button. However, the row is deleted on second click of the button.
Error Messages
Value cannot be blank
Steps to Reproduce
- Configure a section with a repeating grid which is sourced from a Page List property
- Set two fields to display in the repeating grid. One of the fields should be a required field
- Click the 'Add row' button
- Click the 'Delete row' button. Validation message displays
Root Cause
When a field is Required and the focus moves out without providing any value then validation occurs and this is an expected behavior.
On adding a row, the first element in the row has the focus which is a Required field, and even on clicking 'Delete row', validation should be completed. Deletion does not occur for the first time, because the button shifts below due to the addition of the error message in Document Object Model (DOM).
Resolution
Perform the following local-change:- Add a column with the Delete row button
- Add the 'delete item' action on the button
- Include an inline style for the grid column as below:
vertical-align: top;padding-top: 18px;
Tags:
Published August 24, 2018 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.