BitPoet / FormBuilderMultiplier

ProcessWire module extending FormBuilder to allow multiplying fieldsets in the frontend form
Mozilla Public License 2.0
7 stars 2 forks source link

BUG: Fieldset duplicated, when form is not procced caused by an validation error #8

Closed vieregg-jfc closed 10 months ago

vieregg-jfc commented 3 years ago

Hey, @BitPoet

I've found a bug which is really annoying:

When a the form is submitted but not correctly processed - e.g. caused by an validation error - the fieldset gets duplicated and all the functions seems to break.

Steps to reproduce:

  1. Mark a field in form as required, but don't use HTML5 required attribute
  2. Open the form with FormBuilderMultiplier fieldset on frontend.
  3. Add row(s) and fill them.
  4. Try to save it without filling the required field.
  5. Try to add new row(s)
  6. Try to save it without filling the required field.

I wish in advance happy holidays and merry Christmas!

BitPoet commented 3 years ago

Thanks for reporting this. I don't think I ever tested this without the HTML5 required attribute. I'm going to take a look over the holidays.

Merry Christmas and happy holidays to you too!

vieregg-jfc commented 3 years ago

@BitPoet

Hope you had a great couple of holidays. Did you have time to look at the problem?

Normally I would set the HTML5 required attribute for all required fields, but this is not always possible, e.g. for select-, checkbox, or radio-button fields.

Would be great to get an update -I wish you a good start into the new year, best regards!

BitPoet commented 3 years ago

@vieregg-jfc Huge thanks for the pull! I finally got some spare time to deal with issues and merged this into dev. I'm going to give it a spin and hopefully have it in master soon.