BiologicalRecordsCentre / iRecord

Repository to store and track enhancements, issues and tasks regarding the iRecord website.
http://irecord.org.uk
2 stars 1 forks source link

Hitting return on the plant species grid submits the whole form #1675

Open Sam-Amy opened 6 months ago

Sam-Amy commented 6 months ago

This is an issue @sacrevert has found with the BSBI vascular plants form. Pressing return (i.e. enter) on the keyboard whilst in the species grid submitted the entire form, which is annoying if only half way through compiling.

I've also tested on the standard ‘enter a list of records’ for, and the same happens there, but only if you have already been to the second tab to enter the location information, otherwise you get an error prompting you to fill in the requred field on that second tab, so perhaps nt an issues here (@kitenetter, do you agree?).

Is there any way to prevent this on the vascular plant form?

kitenetter commented 6 months ago

@Sam-Amy I'm not aware of people having problems with hitting Enter when using the standard add a list form, so I agree it's not a major issue for that (although it does seem like undesirable behaviour).

johnvanbreda commented 6 months ago

Its standard behaviour on a form on a web page - pressing enter in any control inside the form will submit the form.

Sam-Amy commented 6 months ago

OK, thanks @johnvanbreda. Perhaps we could consider adding a warning about this @sacrevert to the page of the plant form?

sacrevert commented 6 months ago

I suppose most webforms have a higher proportion of mandatory fields though, and a smaller total number of fields. If subscribe to an email or buy something, it's quick to complete and important detail will be mandatory. Here we may have tens of rows (especially for plants and bryos at 1 or 2km), not mandatory, and pressing enter accidentally is very annoying. Could we at least have a popup box to confirm submission if submission is triggered by pressing return? @johnvanbreda

johnvanbreda commented 6 months ago

Although it is standard practice, I agree it's not the expected behaviour when inside the grid. Perhaps it would be better for the return key to move to the next row - i.e. a bit like you are submitting just the row you are on, rather than the whole form.

sacrevert commented 6 months ago

Yes, I think that is exactly what happened to me. There is also the potential confusion when in comments boxes or free text fields, as in some cases (don't know about iRecord) some websites allow carriage returns within free text fields.

Who is this best assigned to, and shall i change title to cover all such grids including the standard 'enter list of records'?