0

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.

1 Answer 1

2

It sounds like your problem is how/when the session variables are set (they are not available on the initial form load). You don't mention how this is done.

Some code example and greater details in your question will allow for a more detailed answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.