Skip to main content

So, this seems like a rather simple task but i'veI've been stuck on it for a while.

I need either in hook_node_presavehook_node_presave or in hook_node_submit hook_node_submit (but NOT in hook_node_validatehook_node_validate) to check for a field value in a node and according to that value choose whether or not to cancel the node saving procedure.

How do I do that? (The canceling part, not the checking part ;) )

So, this seems like a rather simple task but i've been stuck on it for a while.

I need either in hook_node_presave or in hook_node_submit (but NOT in hook_node_validate) to check for a field value in a node and according to that value choose whether or not to cancel the node saving procedure.

How do I do that? (The canceling part, not the checking part ;) )

So, this seems like a rather simple task but I've been stuck on it for a while.

I need either in hook_node_presave or in hook_node_submit (but NOT in hook_node_validate) to check for a field value in a node and according to that value choose whether or not to cancel the node saving procedure.

How do I do that? (The canceling part, not the checking part ;) )

Source Link
user5005
user5005

Prevent node from being saved

So, this seems like a rather simple task but i've been stuck on it for a while.

I need either in hook_node_presave or in hook_node_submit (but NOT in hook_node_validate) to check for a field value in a node and according to that value choose whether or not to cancel the node saving procedure.

How do I do that? (The canceling part, not the checking part ;) )