If the donor forgets to fill in a field in the donation form or fills it in incorrectly, the widget automatically scrolls up to show the 'firstErrorElement'. That is the first field that was not filled in correctly.
In the event of the autoscroll not working, due to a sticky header for example that lies over the error element, you can fix it with scrollTopMargin:
window.rnwWidget = window.rnwWidget || {};
window.rnwWidget.configureWidget = window.rnwWidget.configureWidget || [];
window.rnwWidget.configureWidget.push(function(options) {
options.widget.options.common.scrollTopMargin = 100;
});
Comments
0 comments
Please sign in to leave a comment.