I am using Drupal 7 and the Link module: http://drupal.org/project/link

I need to allow the link module to verify the link is a correct format like it typically does, and then I need to override the value.

I know I need to use a hook somewhere, but what hook can I use that gives me access to the field value before it is saved, and will allow me to change the value if need be?

So I want a process like this:

1) user creates node with link value
2) link module verifies format (already in link module)
3) My custom module gets the link and does some work with it (<<<--- Where I need access)
4) link module saves the link in the database (already in link module)

So basically how to a grab this field right before it is saved, and modify the value?

Thank you

Comments

pragna’s picture

make your own module and use following hooks :

hook_form_alter or
hook_form_FORM_ID_alter(&$form, &$form_state, $form_id)

and then assign a custom validate function in $form variable so when you submit form it goes in your validate function and you can do anything on value of fields before saving in Database.

Best Regards,
Pragna

Pragna J Bhalsod