Re: Add HTML5 required attribute on form widgets

2016-05-05 Thread Collin Anderson
Hi Jon, They're regular input fields that I'm using jQuery to .hide() and .show() form fields on the front end of my ecommerce sites, based on different radio buttons. It's all my jQuery code. I then have custom logic in the backend to delete fields from forms, or select which form to validate aga

Re: Add HTML5 required attribute on form widgets

2016-05-05 Thread Jon Dufresne
On Thu, May 5, 2016 at 11:29 AM, Collin Anderson wrote: > If anyone is running into hidden required fields preventing forms from > submitting (like me), I've been using this jQuery code for a somewhat-hacky > quickfix: > > $(':hidden[required]').removeAttr('required') > > The changes made on mast

Re: Add HTML5 required attribute on form widgets

2016-05-05 Thread Collin Anderson
If anyone is running into hidden required fields preventing forms from submitting (like me), I've been using this jQuery code for a somewhat-hacky quickfix: $(':hidden[required]').removeAttr('required') On Saturday, April 2, 2016 at 12:27:28 PM UTC-4, Jon Dufresne wrote: > > On Wed, Mar 30, 201

Re: Add HTML5 required attribute on form widgets

2016-04-02 Thread Jon Dufresne
On Wed, Mar 30, 2016 at 7:01 AM, Alex Riina wrote: > What's the plan for formsets with extra? > > I could see the required only getting applied to the first min forms but > I'm not sure there is an actual workable case there. It seems like it will > get too messy with adding and deleting at the s

Re: Add HTML5 required attribute on form widgets

2016-03-30 Thread Alex Riina
What's the plan for formsets with extra? I could see the required only getting applied to the first min forms but I'm not sure there is an actual workable case there. It seems like it will get too messy with adding and deleting at the same time. If can_delete is false and extra is 0, it seems

Re: Add HTML5 required attribute on form widgets

2016-03-29 Thread Collin Anderson
Hi All, I think things are kind of quiet because djangocon.eu is starting tomorrow. My opinion: In the past we changed things to use html5 types (number, email, url, etc) and we didn't use a deprecation warning in those cases, just mentioned it in the release notes. I'm sure it will break some pe

Add HTML5 required attribute on form widgets

2016-03-28 Thread Jon Dufresne
Hi, I'm working on ticket #22383 to add the HTML5 required attribute to form widgets. The hope is this will add an additional level of validation at the client side. The feedback provided to the user is much faster than a server round trip. This is something I've done manually in my own projects