Edit form is not "Save Changes" by default : Unique conflict

Issue #215 resolved
Former user created an issue

Originally reported on Google Code with ID 215

1. Create a table with a PK on one column (Integer for example)
2. Insert a row
3. Edit this row without modifying the PK
4. Submit the form by pressing enter from one of the inputs

The row should be updated and saved in the table.

But an error occurs saying the Primary Key must be UNIQUE.

Reason :
The form is built with 2 submit buttons, "Insert As New Row" and "Save Changes" - in
that order. HTML selects the first submit button when submitted via the enter key from
an input.
The action is actually seen as  "Insert As New Row" but the PK is the same as the existing
one.

One solution would be to put the "Save Changes" first, and one might use CSS to make
it appear on the right in order to keep the same appearance (floating?).

Another solution would be to remove the "Insert As New Row" and replace it with a checkbox.

Reported by sherbrow1.0 on 2013-05-16 13:49:08

Comments (3)

  1. Christopher Kramer
    Valid issue and solutions.
    I am not quite sure which one I prefer. Using CSS and switch positions has the disadvantage
    that some users might know the first submit-button is default and would expect different
    behaviour (although I guess most users don't know and expect the most logical behaviour).
    
    The checkbox approach would be intuitive for everybody. I am just not sure I like to
    have a checkbox down there. (And you need an extra click if you want to create a new
    row.) But as this is a rather uncommon option, having a checkbox might be the best
    approach I guess.
    

    Reported by crazy4chrissi on 2013-05-16 15:59:26 - Status changed: Accepted

  2. Christopher Kramer
    This issue was closed by revision r429.
    

    Reported by crazy4chrissi on 2013-12-24 22:53:21 - Status changed: Fixed

  3. Christopher Kramer
    I simply switched positions of the two buttons. I think it is intuitive like this as
    well and not a big deal that the button positions are switched now.
    

    Reported by crazy4chrissi on 2013-12-24 22:54:32 - Labels added: Target-1.9.5

  4. Log in to comment