Jump to content


Delete button on edit view

delete edit button

  • Please log in to reply
11 replies to this topic

#1 fdias

fdias

    grocery CRUD Addict

  • Members
  • PipPipPip
  • 93 posts

Posted 10 July 2012 - 12:47 PM

Hello All!

I've been thinking that it would be nice to have a delete button on edit view that would work just like the cancel button (with confirm prompt) but it would delete the record instead and return to the list.

Am I the only one that thinks this is usefull?

I might work on a "plugin" to do just that, but I wanted to hear your opinions and know if there is a chance of web-johnny adding this feature in a future release.

Cheers.

#2 noskov

noskov

    grocery CRUD Guru

  • Advanced Member
  • PipPipPip
  • 175 posts
  • LocationKiev

Posted 11 July 2012 - 09:16 AM

Don't know, fdias, whether it will be usefull. It is just my opinion, but I faced with problems when users had deleted their data (for example, blog post) absolutely occasionaly :rolleyes: They just dreaming about something :wub: and click the "delete" button :o . That's why I don't like to give once more opportunity to delete data.

And the other thing that for now in the edit page we already have 3 buttons(!). I hear from some users that they was a little bit confused, when was editing something for the first time. It seems to me that the 4-th button can confuse someone even more.

Whatever, it's just my opinion :)

#3 fdias

fdias

    grocery CRUD Addict

  • Members
  • PipPipPip
  • 93 posts

Posted 11 July 2012 - 01:58 PM

Thanks noskov, these are some interesting considerations. I agree 4 buttons would be a lot (although it would not show on the add view) and I find the cancel button a little bit unecessary.

One thing I like about having the delete button inside the edit view is that the user is absolutely sure of the record he's deleting, where the delete from the list you can sometimes click on the wrong column,

Any how I believe it's a nice feature to have and perhaps have it enabled/disabled and we could have the same enable/disable options for the cancel and save/update and return to list buttons.

Another thing is that the delete button could be say left aligned and RED or something else that would set it apart from the rest.

Cheers.

#4 noskov

noskov

    grocery CRUD Guru

  • Advanced Member
  • PipPipPip
  • 175 posts
  • LocationKiev

Posted 11 July 2012 - 04:02 PM

Yeah, I agree with you that delete button is usefull at the editing page for those people who are absolutely sure for deleting. But it is edit page and users come here to edit and not delete. That is the thing that confuse me.

And as for the red colored button aligned from the rest it is a good idea. This is a simple visual way to differentiate the functionality. I think it would be great for now if we have "cancel" button colored in something :P I say this because as I have notice users (especially at the first time) don't know and don't understand how everithing works, what dealing with something else. For them it's easy to perceive the functionallity of buttons in colors. All of us perfectly understand that the green button is ... orange button is ... and red one is deleting.

#5 fdias

fdias

    grocery CRUD Addict

  • Members
  • PipPipPip
  • 93 posts

Posted 11 July 2012 - 05:10 PM

That's true. The update and update and return button should remain on the left side, but cancel and perhaps delete should be set apart not to confuse users. I might give this a try and post it so we can take a look.

#6 noskov

noskov

    grocery CRUD Guru

  • Advanced Member
  • PipPipPip
  • 175 posts
  • LocationKiev

Posted 11 July 2012 - 08:28 PM

Yes, if you have time it would be great if you will share your example. I think, if other members of forum will find it usefull and attractive, they can use your code. In the other hand if Johnny would decide to include it in the library, we all will have it :) But I don't know Johnny's opinion of our discussion.

#7 web-johnny

web-johnny

    grocery CRUD Author

  • Administrators
  • 1,092 posts
  • LocationLondon

Posted 12 July 2012 - 06:45 AM

Well I think it is a good idea but the main problem is that I have to get rid of the prompt when a user doesn't change anything at add/edit forms. For example if you go to edit form and then press "Go back to list" there is a prompt "The data you had change may not be saved.Are you sure you want to go back to list?" . So if the user is NOT getting this messages without any changes will not press the ok button by mistake for the delete.
I always had problems with customers that press the ok button of the delete and then said "I didn't realize that I will delete my record".

I want also to see if other users have the same request.

Cheers
Posted Image

#8 noskov

noskov

    grocery CRUD Guru

  • Advanced Member
  • PipPipPip
  • 175 posts
  • LocationKiev

Posted 12 July 2012 - 04:13 PM

Hi!

About prompt and confimation. It's just my opinion based on watchig how users add and edit data. Maybe it's just mentality differences, I don't know. But I have noticed that users never click on "Go back to list" button, and if they click that happens only because of the button is exist there and they see it. So, as for me, if "Go back to list" button will disappear, nothing will change. Also it seems to me that "Go back..." button duplicates the behavior of "Cancel" button. And if I have to choose between that two buttons I will choose "Cancel" button. I think "Go back..." not so usefull also becouse of we every moment can click to other links (in the grocery CRUD examples: Offices, Employees or something else) and we will go there without any confirmation. Well...

#9 web-johnny

web-johnny

    grocery CRUD Author

  • Administrators
  • 1,092 posts
  • LocationLondon

Posted 13 July 2012 - 12:13 AM

Well you are actually right. I will remove the "back to list" as it is almost useless and instead I will probably add the delete button. I think it make sense as sometimes users go to edit page to delete something rather than press the tiny little button at the grid. Perhaps I am wrong. I will have a second thought and see what I will finally do <_<

And I also notice that it is time to get rid of the default buttons and add some fancy new twitter bootstrap buttons at flexigrid theme :) . What do you think?

EDIT: I had a second thought and I will not add the delete button to the edit as it is not straight away of what this button is there for. In addition I don't want to duplicate functionality without any reason. I want to do it as simple as I can. Even the 3rd button as mentioned is too much but I really had a big thought that both three buttons are really needed to be there. However for those who disagree they can always use the unset_back_to_list(); like this:
$crud->unset_back_to_list();
and the button save and go back to list will simply disappear .
Posted Image

#10 noskov

noskov

    grocery CRUD Guru

  • Advanced Member
  • PipPipPip
  • 175 posts
  • LocationKiev

Posted 13 July 2012 - 07:10 AM

Yes, it seems to me that 3 buttons in one place is too much, but... yes, web-johnny, you are absolutely right, they are really needed and they do not duplicate the functionality of each other. So in this case they have to be there (no matter what I think about their amount :P ).

I find "Save & go back..." button is needed for users, they use this button instead of "Go back to list" (maybe because of its position at the controlls buttons). That's why I have never turned it off with:
$crud->unset_back_to_list();
I think it's beter have 2 buttons with the similar functionallity rather have no one ;) Well, it's just my "philosophizing".

By the way I have made an example of beautifull buttons design :D Look at the screenshot:
buttons.png

As for Bootstrap buttons. Yes, I agree with you and have both hands for that.

#11 fdias

fdias

    grocery CRUD Addict

  • Members
  • PipPipPip
  • 93 posts

Posted 13 July 2012 - 01:12 PM

I agree with noskov that if I had to remove one of the two buttons I would remove the back to list link on the top right corner as it's not really used.

The update and go back to list is very usefull in my opinion and it's not the same as the back to list.

I thought about something like the beautiful design of noskov :), but with a delete button on the right corner. Maybe a delete button gmail-like.

Posted Image

I believe that even if the delete button was at the top next to the back to list button it would still be a usefull feature. All oldtime gmail users will remember that early on Gmail did not have a delete button and it was one of the most requested features until they finally agreed on having one.

I understand all your concerns, but perhaps as I mentioned to put the button at the top next to back to list link that would ensure only users that knew that this is really the delete button would use the functionality and we wouldn't have to worry about the quantity of buttons at the bottom or a user deleting by mistake.

Just a suggestion ;)

#12 Felipe Matos

Felipe Matos

    Member

  • Members
  • PipPip
  • 11 posts

Posted 08 January 2014 - 01:54 PM

Hi everybody,

 

Thanks for the Grocery Crud, is very usefull.

 

My doubt is how I fix the problem of the prompt messege. 

 

I try the getState == 'delete' but I dont give sucess!

 

Someone help?

 

Sorry my english! :blink:







Also tagged with one or more of these keywords: delete, edit, button

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users