function webform_registrationpw_submit($form, &$form_state) {
// first, we need to identify the password field for this registration form
$node = node_load($form_state['values']['details']['nid']);
$nodePassField = "";
foreach( $node->webform['components'] as $key => $value ) {
if ( $value['form_key'] =="password" ) {
$nodePassField = $key;
}
}
if ( "" == $form_state['values']['submitted'][$nodePassField] ) { //this is the line giving the error
$form_state['values']['submitted'][$nodePassField] = newpw(8); // set new password
}
}
大家好,上面是给我“未定义偏移量:4”错误的代码。我尝试使用 isset() 和其他一些东西,但我继续收到错误。你能帮帮我吗?我还是很新,还在学习。
谢谢。