Log message #4125151

# At Username Text
# Mar 14th 2018, 17:18 alexmax I might just novalidate the form
# Mar 14th 2018, 17:17 sssd validation*
# Mar 14th 2018, 17:17 sssd can try reportValidity() also to manully run html5 validaion
# Mar 14th 2018, 17:16 sssd @alexmax try form.checkValidity() to see if form is valid
# Mar 14th 2018, 17:15 jeremyharris the inputs aren’t siblings, fwiw
# Mar 14th 2018, 17:15 jeremyharris yeah it works for me just fine in chrome
# Mar 14th 2018, 17:14 jeremyharris hm I have a checkbox required with a hidden field, let me check it out in chrome
# Mar 14th 2018, 17:13 jeremyharris interesting. I’m surprised we haven’t heard of that issue yet
# Mar 14th 2018, 17:13 alexmax It seems like a shortcoming on Chrome's end. Maybe it keeps a list of all 'names' with required, and then hits the hidden field first when it tries to check for it.
# Mar 14th 2018, 17:12 jeremyharris (since the hidden field is not `required`)
# Mar 14th 2018, 17:12 jeremyharris it should only be trying to focus on the actual checkbox though :thinking_face:
# Mar 14th 2018, 17:12 jeremyharris if you remove the hidden input does it work? `hiddenField => false`
# Mar 14th 2018, 17:11 jeremyharris yeah seems correct
# Mar 14th 2018, 17:11 alexmax As you can see, the visible checkbox is marked required, and the hidden field next to it is not. That seems correct, but Chrome does not appear to like it still.
# Mar 14th 2018, 17:10 alexmax Sorry for the IRC folks who had to put up with my edits.
# Mar 14th 2018, 17:10 alexmax ```<div class="input checkbox required"> <input type="hidden" name="foobar" value="0"> <input type="checkbox" name="foobar" value="1" required="required" id="foobar"> <label for="foobar">Foobar Field</label> <small><a href="">Download Foobar Field</a></small> </div>
# Mar 14th 2018, 17:10 jeremyharris it could be trying to focus on it on submit
# Mar 14th 2018, 17:10 alexmax This is what my checkbox field looks like under the covers. I have changed the markup ever so slightly from the original, but I think it's mostly the same, just in a different order.
# Mar 14th 2018, 17:10 jeremyharris or is there a `required` attr on a hidden element somewhere?
# Mar 14th 2018, 17:09 jeremyharris something is trying to focus on an element it can’t focus on. maybe tabbing through, or JS somewhere?
# Mar 14th 2018, 17:09 alexmax But the thing is, I actually like the validation it does on text fields, so I'd like to keep that if posible.
# Mar 14th 2018, 17:08 alexmax I don't think _I_ am doing anything, it's Chrome being too helpful.
# Mar 14th 2018, 17:08 jeremyharris from what I’ve read
# Mar 14th 2018, 17:08 jeremyharris yes likely
# Mar 14th 2018, 17:08 alexmax I think the error message is coming from Chrome's default built-in validation.
# Mar 14th 2018, 17:08 jeremyharris or disabled?
# Mar 14th 2018, 17:07 jeremyharris are you trying to focus on a hidden element?
# Mar 14th 2018, 17:06 alexmax I think it might have something to do with the hidden '0' field before every checkbox.
# Mar 14th 2018, 17:05 alexmax This is happening for every form field that is a checkbox.
# Mar 14th 2018, 17:05 alexmax `An invalid form control with name='foobar' is not focusable.`
# Mar 14th 2018, 17:05 alexmax getting spammed with
# Mar 14th 2018, 17:05 alexmax A CakePHP-generated form is refusing to submit
# Mar 14th 2018, 17:04 alexmax Dang
# Mar 14th 2018, 16:40 jeremyharris yep, cake provides a lot of security out of the box, and sql injection is definitely one of those. the entire orm layer is just really pleasant to work with, not just the query builder
# Mar 14th 2018, 16:40 sssd then i switched to ORM and i was amazed how readable and easy it was to figure out the purpose and output just by reading
# Mar 14th 2018, 16:39 sssd true that ORM is a must i used to write SQL queries by hand it was a big mess . 10 lines of sql and only aid to readability was capitalization of keywords.
# Mar 14th 2018, 16:34 jeremyharris but the framework as a whole makes development fast and clean
# Mar 14th 2018, 16:33 jeremyharris you can use it outside the framework as well
# Mar 14th 2018, 16:33 jeremyharris that’s a hard question. many might say the ORM
# Mar 14th 2018, 16:33 sssd @jeremyharris yea got it, but what is best thing about cakephp ?
# Mar 14th 2018, 16:23 jeremyharris if you’re deciding between the two, I would run through their respective tutorials, hang out in the communities, explore the plugin space, and decide which one (if either) fits your needs. we’ll be happy to answer any cake specific questions if you’ve got them