3 Images to explain better
source | link

Create a module for example module name is rose. In that module implement hook_node_validate

function rose_node_validate($node, $form, &$form_state) {
       //Check to see if this is the node form data you want to change
    if ($form['#form_id'] == 'contentType_node_form') {
        //based on the value provided in 
        $form_state['input']['field_name']['und'][0]['value'];
        $new_info_data = 'some logic'; //get the data you would like to save .
        variable_set('new_info', $new_info_data); //Save the data in a variable.
    }
}

Then implement a hook_node_presave. As per our example

function rose_node_presave($node) {
    //check if the node type is the one you want to change the value
    if ($node->type == 'content_type') {
        $new_info = variable_get('new_info'); //get the value which was set in validation variable_set()
        $node->field_name['und'][0]['value'] = $new_info;
    }
}

I have implemented this on Drupal 7. A user enters instagram user name and I get the instagram id from instagram api and save it. Let me know if more explanation is required.

In this implementation users enters only address I get the Lat and Lng based on the address provided and save it in the database. enter image description here

enter image description here

Create a module for example module name is rose. In that module implement hook_node_validate

function rose_node_validate($node, $form, &$form_state) {
       //Check to see if this is the node form data you want to change
    if ($form['#form_id'] == 'contentType_node_form') {
        //based on the value provided in 
        $form_state['input']['field_name']['und'][0]['value'];
        $new_info_data = 'some logic'; //get the data you would like to save .
        variable_set('new_info', $new_info_data); //Save the data in a variable.
    }
}

Then implement a hook_node_presave. As per our example

function rose_node_presave($node) {
    //check if the node type is the one you want to change the value
    if ($node->type == 'content_type') {
        $new_info = variable_get('new_info'); //get the value which was set in validation variable_set()
        $node->field_name['und'][0]['value'] = $new_info;
    }
}

I have implemented this on Drupal 7. A user enters instagram user name and I get the instagram id from instagram api and save it. Let me know if more explanation is required.

Create a module for example module name is rose. In that module implement hook_node_validate

function rose_node_validate($node, $form, &$form_state) {
       //Check to see if this is the node form data you want to change
    if ($form['#form_id'] == 'contentType_node_form') {
        //based on the value provided in 
        $form_state['input']['field_name']['und'][0]['value'];
        $new_info_data = 'some logic'; //get the data you would like to save .
        variable_set('new_info', $new_info_data); //Save the data in a variable.
    }
}

Then implement a hook_node_presave. As per our example

function rose_node_presave($node) {
    //check if the node type is the one you want to change the value
    if ($node->type == 'content_type') {
        $new_info = variable_get('new_info'); //get the value which was set in validation variable_set()
        $node->field_name['und'][0]['value'] = $new_info;
    }
}

I have implemented this on Drupal 7. A user enters instagram user name and I get the instagram id from instagram api and save it. Let me know if more explanation is required.

In this implementation users enters only address I get the Lat and Lng based on the address provided and save it in the database. enter image description here

enter image description here

2 added 16 characters in body
source | link

Create a module for example module name is rose. In that module implement hook_node_validate

function rose_node_validate($node, $form, &$form_state) {
       //Check to see if this is the node form data you want to change
    if ($form['#form_id'] == 'contentType_node_form') {
        //based on the value provided in 
        $form_state['input']['field_name']['und'][0]['value'];
        $new_info_data = 'some logic'; //get the data you would like to save .
        variable_set('new_info', $new_info_data); //Save the data in a variable.
    }
}

Then implement a hook_node_presave. As per our example

function rose_node_presave($node) {
    //check if the node type is the one you want to change the value
    if ($node->type == 'content_type') {
        $new_info = variable_get('new_info'); //get the value withwhich was set in validation variable_set()
        $node->field_name['und'][0]['value'] = $new_info;
    }
}

I have implemented this on Drupal 7. A user enters instagram user name and I get the instagram id from instagram api and save it. Let me know if more explanation is required.

Create a module for example module name is rose. In that module implement hook_node_validate

function rose_node_validate($node, $form, &$form_state) {
       //Check to see if this is the node form data you want to change
    if ($form['#form_id'] == 'contentType_node_form') {
        //based on the value provided in 
        $form_state['input']['field_name']['und'][0]['value'];
        $new_info_data = 'some logic'; //get the data you would like to save .
        variable_set('new_info', $new_info_data); //Save the data in a variable.
    }
}

Then implement a hook_node_presave. As per our example

function rose_node_presave($node) {
    //check if the node type is the one you want to change the value
    if ($node->type == 'content_type') {
        $new_info = variable_get('new_info'); //get the value with was set in validation
        $node->field_name['und'][0]['value'] = $new_info;
    }
}

I have implemented this on Drupal 7. A user enters instagram user name and I get the instagram id from instagram api and save it. Let me know if more explanation is required.

Create a module for example module name is rose. In that module implement hook_node_validate

function rose_node_validate($node, $form, &$form_state) {
       //Check to see if this is the node form data you want to change
    if ($form['#form_id'] == 'contentType_node_form') {
        //based on the value provided in 
        $form_state['input']['field_name']['und'][0]['value'];
        $new_info_data = 'some logic'; //get the data you would like to save .
        variable_set('new_info', $new_info_data); //Save the data in a variable.
    }
}

Then implement a hook_node_presave. As per our example

function rose_node_presave($node) {
    //check if the node type is the one you want to change the value
    if ($node->type == 'content_type') {
        $new_info = variable_get('new_info'); //get the value which was set in validation variable_set()
        $node->field_name['und'][0]['value'] = $new_info;
    }
}

I have implemented this on Drupal 7. A user enters instagram user name and I get the instagram id from instagram api and save it. Let me know if more explanation is required.

1
source | link

Create a module for example module name is rose. In that module implement hook_node_validate

function rose_node_validate($node, $form, &$form_state) {
       //Check to see if this is the node form data you want to change
    if ($form['#form_id'] == 'contentType_node_form') {
        //based on the value provided in 
        $form_state['input']['field_name']['und'][0]['value'];
        $new_info_data = 'some logic'; //get the data you would like to save .
        variable_set('new_info', $new_info_data); //Save the data in a variable.
    }
}

Then implement a hook_node_presave. As per our example

function rose_node_presave($node) {
    //check if the node type is the one you want to change the value
    if ($node->type == 'content_type') {
        $new_info = variable_get('new_info'); //get the value with was set in validation
        $node->field_name['und'][0]['value'] = $new_info;
    }
}

I have implemented this on Drupal 7. A user enters instagram user name and I get the instagram id from instagram api and save it. Let me know if more explanation is required.