Hi there,

I have created a custom Assignment content type for users on my site and in this content type is a CCK checkbox used to indicate the status (complete/incomplete) of the assignment. The site administrator is responsible for creating these assignments and assigning them to specific users via a user reference field. The users would then view these assignments by going to their account profile page which is laid out as a dashboard type template and they would see a listing of their assignments in a views table on the screen.

What I would like to do is to have a way where the user can simply click a link or a status icon to toggle the status of the particular assignment node without having to have them bring up the node edit form. I would like to keep the access of the actual assignment node form to the administrator only. The user only needs to see the content output of the assignment body and not the administrative form used to create/edit the node.

In essence what I am looking for is a way to click a link associated with an assignment node which would in turn load the node data, modify the value of the CKK status field and save the data back to the database while updating the current status indicator for the node on the profile screen. I currently display either a red check mark or green check mark in the table of assignments to indicate status. All of this would be done in the background without a page refresh. I would even be okay with a page refresh of the profile page the user is on when toggling the status as long as the node edit form for the assignment does not need to be displayed.

I'm assuming that something like this could be handled using AJAX but I need a little further direction. Any advice would be much appreciated.

Thanks

Comments

nevets’s picture

If there are only two states to status you could use the flag module.

jastylr’s picture

Thanks, I will check that out. Yes, there are only two states, Completed or Incomplete.

I did just find the editablefields module which does use AJAX and supports views but I would like to use a custom icon to click on rather than the actual checkbox that was created in the content type.