News for hackers. Stuff that matters.
Re:Styling form states without JavaScript by somishere on Thursday November 17, 2022 @09:00PM (#33648858)
Personally I would be aiming for consistency / simplicity. There's so many good ways to solve this at a design level without introducing a multi-phased state system. But that's me.
Re:Styling form states without JavaScript by tshaddox on Thursday November 17, 2022 @11:32PM (#33650342)
But that's the thing: many JavaScript form validation libraries already do implement the state machine and present a consistent and simple API for the developer to use. It would be nice if this built-in stuff could fully replace JavaScript form validation libraries, but it's just not there yet.
Re:Styling form states without JavaScript by somishere on Friday November 18, 2022 @01:39AM (#33651157)
Totally get that. And I think if those are the conventions you're designing form interactivity with then, absolutely, you probably need a javascript library to validate and step your user through form submission.

My point is that this should be the exception, not the rule. I certainly don't think this level of abstracted complexity is necessary, or even better, in most scenarios. I'm talking at a design or implementation level.

Re:Styling form states without JavaScript by neweroldguy on Friday November 18, 2022 @08:50AM (#33654624)
Many people are significantly less technically savvy than you might expect. Every form really needs all of these conventions if you want to make your software as widely usable as possible (which is all consumer software at least, or should be).

So in fact I think it is the rule, not the exception.

Unfortunately you have to do a dumb JS dance to get these reasonable accordances. Hard to blame people for not reimplementing all this shit even if it’s critically useful for many folks.

Re:Styling form states without JavaScript by somishere on Friday November 18, 2022 @04:28PM (#33662528)
I'll have to respectfully disagree. Not with your first sentence, that's true enough, but everything else.