Op zondag 21 mei 2006 13:31, schreef Earl Dunovant:
In hook_form_alter() try
$form['title']['#type'] = 'value'; $form['title']['#value'] = 'dummy value';
I do a $form['title']['#type'] = 'value'; $form['title']['#value'] = 'THIS_MIGHT_VALIDATE'; But that is neither clean nor secure. what if the hypothetical title_must_contain_three_words.module hops in ? Nor will the autogenerated title pass by any validation anymore. This is the current route a node takes (very rough) new/existing node -> POST -> hook_validate -> Store -> hook_insert() I would love to see, use or have: new/existing node -> POST -> *DO STUFF* -> hook_validate -> Store -> hook_insert() As you can see, _insert and nodeapi('insert') is too late anyway. (I need to verify, it was like this all along 4.7 to head a few months ago. But even itf it hooks in earlier, I cannot use it) So let me take a step back, rephrase, and ask my question again: I am looking for the following: I want to generate the title of a node from content in that node. I currently manage to do this, by abusing validation, by adding dummy text in hook_form_alter. I am looking for a SOLID and clean way to achieve this. So: Is form api able to help me with this? In some undocumented hook that I missed? Or do we simply lack the hooks to do this, and should I continue on my hackish and dirty (but working) road? Bèr -- [ Bèr Kessels | Drupal services www.webschuur.com ] CVS onder de knie krijgen: http://help.sympal.nl/cvs_onder_de_knie_krijgen