6

Work wants me to scroll to invalid fields after validation on a form. Is there actually a use case for that? Because it sounds terrible.

Comments
  • 6
    Give them what they want. Scroll to each field. Slowly. Incrementally. With prolapsed tweening. Teach them how much they don't want it.
  • 7
    You should validate fields on the fly not the entire form 😭
  • 0
    Also
    Form follows function

    Not
    Function follows form
  • 6
    Scroll to first error, sure. Scroll to each error 🤔I don't know how "basic" your users are but that form isn't fit for purpose if it's complicated enough they can get it wrong.
  • 2
    @karma true, but this is not a hill I am willing to die on. This whole app is held together with bubble gum, paper clips, baling twine, and probably a sacrifice or two to demons.
  • 1
    @C0D4 I assume they mean scroll to the first error. But I also think that also sounds terrible. Especially since the form is not that big.
  • 3
    @projektaquarius I have that on large forms, but it can be tedious to some users as you are hijacking the browser.

    Maybe a floating group of errors which you can click per error to scroll up to specified input? At least then you give some control back to the user and it still scrolls to errors.
  • 0
    @projektaquarius just 2 demons ✌️then its worth fitting in this Demogorgon to sweeten it up abit
  • 0
    I also learned its better to split up forms, and a scrollable form will have people drop off very quickly...
  • 2
    @C0D4 I agree in spirit, but I am 99% sure if I implement it as such I will somehow set the css on fire . . . again . . .

    They ran out of bubblegum for the css.
  • 2
    Yesss, burn it all down with css 🔥 thats fine
  • 2
    @projektaquarius 🤷‍♂️what's a few more lines with !important in a hell hole of bubblegum and rust?
  • 3
    @C0D4 *thousand yard stare* you weren't there man, you weren't there.
  • 3
    @projektaquarius don't worry, I've bleached my eyes several times in my career, there are things people would curl up in a ball and whimper over I've had to erase from my mind.

    If your using a css file, and not inline styling on every freakish div, span and label tag with no consistency, it's not that bad.

    Now excuse me, I need another shot of bleach, to remove this one too.

    As I found recently,

    Business: let's remove this border...
    Me: ok
    Me: wait a minute, where did this huge ass rounded border come from?
    Me: puts original border back, round border gone again
    Business: we removed that rounded border years ago
    Me: this says other wise.

    An overlapping div was "hiding" the original border 🤦‍♂️
  • 1
    @C0D4 I had to pin a footer to the bottom of the page. Found a tutorial. It worked. Until they changed the content margins. Small tweek later. It works. Until the scroll top button comes online. Another tweek. It works. Until they change the navigation elements in the header. Turns out someone had put in a "display: flex" that was being inherited to literally every control.
  • 1
    @C0D4 btw, I don't know css. This was the first ever css task I had ever been given. It broke in production.
  • 2
    @projektaquarius sounds like someone (prev dev) didn't know what the box model is.

    https://developer.mozilla.org/en-US...
  • 1
    @C0D4 pretty much.

    Our front end dev was helping me out and after it broke the 8th time she loudly announced that she was taking over, because someone had obviously fucked up (not me) and it wasn't cool to continue to waste a mostly backend developer's time when there were bigger fish to fry.
  • 1
    I don't know what area you work in, but maybe tell them this will really mess with screen readers. The visually impaired will be completely lost if you programmatically change the focus on them repeatedly
  • 1
    Or:

    Make the fields scroll to you.

    Just make em slowly creep up from the edge of the screen right in the middle.

    Add jaws soundtrack.
  • 1
    @Ranchu Please someone make this.
Add Comment