I have written a code in drupal that after hitting node edit a delete query will run and unselect the radio button to display an alert each time. The query is working fine but the radio button got unchecked after second time reload. I want to uncheck that just after user click "Edit"
function debtcc_manage_node_prepare($node)
{
$nid = $node->nid;
if ($nid != null) {
//field_cache_clear();
$query = db_delete('field_data_field_change_updation_date')
->condition('entity_id',$nid)->execute();
field_cache_clear();
}
}
How can I achieve that? Is there any function in drupal to refresh the page automatically or other way?