Alter label with token I am trying to build a questionnaire that simply replaces (alters) the label of a list field. I am doing so by replacing a token from views (embed) and implementing hook_form_alter() in a separate module.
How can I save that value and write it to the database?
I am using an Entity form and a list-field.
This is the snippet I am struggling with, found on Store token replacement values in the database rather than tokens themselves.
function question_to_label_node_presave($node) {
  if ($node-&gt;type == 'page') {
    $replaced_text =  token_replace($node-&gt;field_question['und'][0]['value']);
    $node-&gt;field_question['und'][0]['value'] = $replaced_text;
  }
}

I am currently trying to run this in a custom module, but I cannot find the right content type for the Entity form. I am using the Devel module to find the right array value.
I´ve solved it by using a token, and placed that token (from a view) in a hidden field in that form - thus saving that value.

The same token generated from views - I used to alter the label for that question with "hook_alter_form".

A kind of non programmatically way of solving the problem.