madoublet/respond5

Required field in form input not stored correctly

Opened this issue · 4 comments

Maintenance for Respond 5 - madoublet/respond#397

For me Respond 5 is even better than Respond 6

Thanks

I think this commit is cause problem - 0c17394

@miguelurtado : What part of commit 0c17394 do you think is causing the problem?

I very much need to get this bug fixed also.

@miguelurtado : Just checking to see if you can add any more information to this issue. I would like to solve it.

I have done some more digging. I still don't have a fix, but I will share what I have learned in case it will help.

The first problem I've found is that the editor always saves form fields with the attribute required="required" regardless of whether the field is set to required or not.

It also appears that the web component is expecting the value of the attribute to be "true" or "false", not "required".

Finally, even when the form field is correctly rendered in the DOM with the "required" attribute (ex: <input name="myfield" required>) it is not enforced.

From looking at how all three of those pieces interact, I think the first thing is the true cause of the problem. If we can get the "required" attribute to correctly render with a value of true or false, I think it will fix this issue.