Why is $ form_state ['values'] destroyed in drupal_process_form ()?

I am trying to programmatically save nodes of type CCK using drupal_execute (). Empty nodes are created; none of the CCK fields are saved. Obviously, the first line in drupal_process_form () answers:

$form_state['values'] = array();

So my question is why the “values” are erased and, more importantly, how can I save the CCK fields using drupal_execute ()?

I tried save_node (), which worked well; however, I would prefer the former, as it causes confirmation.

+3
source share
1 answer

drupal_process_form(), $_POST global . drupal_execute(), , , $_POST $form_state['values'].

, , , "" , drupal_execute , , " normal 'submit.

, - , - . , , CCK ( , node_save(), ).

+3

Source: https://habr.com/ru/post/1751918/


All Articles