This guide will explain how to expand repeat entries on field validation errors.
Please check out this guide to add the custom attributes required option to show a message if the field is empty. And use the new Repeat feature “Require New Entry If Fields Changed”. Using these options, you can make sure new Repeat entries are fully completed.
- Initial Setup:
- Drag and drop a “JavaScript” field onto your existing form where you want to expand the repeat entries with field validation errors.
- Rename the field as needed.
- Configuring The “JavaScript” Field:
- Click the pencil icon of the “JavaScript” field.
- Paste the code.
- Please use this code.
- Save the changes.
// Listen to the parsley error event
window.Parsley.on( 'field:error', function() {
// Find the collapse panel and toggle its state
$( this.$element ).closest( '.panel' ).find( '.panel-collapse' ).collapse( 'show' );
} );
- Test Your Form:
- It will automatically expand entries with errors during form submission.
For any questions, please contact us - [email protected] or the Formyoula in-app chat. 🙂