I have a webform. I provide default values to these webform using session token variables. These session variables are set using hook_form_alter()
. The problem is that when users log in, and see the form, it is not populated. When they refresh the form, only the values get populated.
How can I solve this issue?
/** updates **/
I have custom module like
webform_options_form_alter(&$form, &$form_state, $form_id){
//here i set some values for session variables like.
$_SESSION['name'] = 'pradeep';
}
so in webform default value i put like %session['name']. This takes the value when page is refreshed.
I have the login form as block on the same page of the webform. As soon as the user logs in the webform should be filled with user data. This is not happening. When he refreshes the page after login only he sees his data.