Make use of REQUIRED attribute in forms?

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The current feature release of phpBB 3 is 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
Rhino.Freak
Registered User
Posts: 48
Joined: Thu Dec 24, 2015 10:47 am

Make use of REQUIRED attribute in forms?

Post by Rhino.Freak »

We can submit the forms (username, password etc) without actually filling which later gives us an error.
Why not include a required inside the input tags there by default?
much easier solution

Rhino.Freak
Registered User
Posts: 48
Joined: Thu Dec 24, 2015 10:47 am

Re: Make use of REQUIRED attribute in forms?

Post by Rhino.Freak »

http://i.imgur.com/N5o2NBK.png

this is what I'm talking about guys. Anyone understand me?

CHItA
Development Team
Development Team
Posts: 169
Joined: Thu Mar 12, 2015 1:43 pm
Location: Budapest, Hungary

Re: Make use of REQUIRED attribute in forms?

Post by CHItA »

Rhino.Freak wrote: Fri May 06, 2016 7:06 amthis is what I'm talking about guys. Anyone understand me?
We do. However it is not supported by all browsers that we support, and one could argue, that then we should move all form validations to the front end, which is fine, but a rather huge amount of work.

User avatar
RMcGirr83
Registered User
Posts: 360
Joined: Fri Mar 09, 2007 1:51 am
Contact:

Re: Make use of REQUIRED attribute in forms?

Post by RMcGirr83 »

As far as I can tell the only browser that doesn't support the attribute is safari? How much work are we talking about? When doing a search on both prosilver and adm styles I got 150 hits for the text, email and password types...many of which are, probably, in the same html file.
Do not hire Christian Bullock he won't finish the job and will keep your money

CHItA
Development Team
Development Team
Posts: 169
Joined: Thu Mar 12, 2015 1:43 pm
Location: Budapest, Hungary

Re: Make use of REQUIRED attribute in forms?

Post by CHItA »

RMcGirr83 wrote: Fri May 06, 2016 10:13 am As far as I can tell the only browser that doesn't support the attribute is safari? How much work are we talking about? When doing a search on both prosilver and adm styles I got 150 hits for the text, email and password types...many of which are, probably, in the same html file.
AFAIK IE9 and below as well. I'm not against it, I'm just saying it is (or should be) more complecated then adding the required attribute to the form elements.

User avatar
Barrnet
Registered User
Posts: 10
Joined: Tue Feb 05, 2013 3:04 am

Re: Make use of REQUIRED attribute in forms?

Post by Barrnet »

+1
Most of users use a modern browser chan check if a "required" form is compiled, and the error message is already translated in user's locale. This can help to modernize the UI and offer a more user friendly form with less reload of page.

Going4Quests
Registered User
Posts: 6
Joined: Wed Apr 02, 2014 8:22 pm

Re: Make use of REQUIRED attribute in forms?

Post by Going4Quests »

You can check here where the required attribute is supported: http://caniuse.com/#search=required

I think it would be a great addition to include require, but the back end validation shouldnt be removed. Html attributes can be bypassed easy apparantly and also ofcourse there are browsers that dont support this.

But it wont hurt to just add this in across phpBB as an extra layer. It will work in browsers that support it improving the usage of phpBB and do no single harm in older browsers seeing attributes that arent supported are just being ignored by the browsers.

Support. :)

User avatar
3Di
Registered User
Posts: 951
Joined: Tue Nov 01, 2005 9:50 pm
Location: Milano 🇮🇹 Frankfurt 🇩🇪
Contact:

Re: Make use of REQUIRED attribute in forms?

Post by 3Di »

If that's somehow trasparent to the browsers that are not currently supporting it, why not?
I am then all with this.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades

User avatar
RMcGirr83
Registered User
Posts: 360
Joined: Fri Mar 09, 2007 1:51 am
Contact:

Re: Make use of REQUIRED attribute in forms?

Post by RMcGirr83 »

Going4Quests wrote: Fri May 06, 2016 8:06 pmI think it would be a great addition to include require, but the back end validation shouldnt be removed.
It will not invalidate the back end PHP processes. It's simply a tooltip type popup if a user misses an input.
Do not hire Christian Bullock he won't finish the job and will keep your money

Rhino.Freak
Registered User
Posts: 48
Joined: Thu Dec 24, 2015 10:47 am

Re: Make use of REQUIRED attribute in forms?

Post by Rhino.Freak »

Guys I think phpbb 3.2 is already feature locked (correct me if I'm wrong)
So by the time the next version (3.3?) comes out I'm sure even Safari will be supporting this. Let's think future :)

Let's do this! :D

Post Reply