Destroy row
introfini - May 9, 2009 - 02:05
| Project: | Views Custom Field |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed |
Jump to:
Description
Hi,
Is possible to have a custom field that removes the row from a table if some conditions are met?
Thanks,
introfini

#1
Nope, but I'll think about it.
#2
Thanks!
That way we can for example make group by queries...
introfini
#3
subscribing. Need this feature too.
#4
Here is my "delete" button i just got working(adds button to each row to delete node. You can change the button condition to anything else you want:
<?phpprint "<form method='post'>";
print "<input name='".$data->nid."' type='submit' value='delete' />";
print "</form>";
$a=$_POST[$data->nid];
if (!empty($a))
{
node_delete($data->nid); //delete node
node_load($data->nid, NULL, TRUE); //clear node from cache
print "removed";
}
if(isset($_POST['submit']))
{
unset($_POST['submit']);
}
?>
Any ideas how i could refresh the view after this(as you can see, now i have to use the "removed" text to inform that the row will be gone after next refresh)?
Also, can the "node blahblah has been deleted" text be disabled somehow?