Could someone explain how to pass data from form in popup page to form in original page?
thank you.

Comments

nagarajanl’s picture

you can use a simple variabel_get / set operations or try with the $form_state['storage'] or try with sessions etc...

loveonflower’s picture

Hi nagarajanl, thanks for the reply.
do you have any snippet of the codes on how to do it?
I really have no idea how to implement it.

nagarajanl’s picture

While submitting your Pop up API form just add the required data that u need to be passed to the main form using variable_set function (http://api.drupal.org/api/drupal/includes--bootstrap.inc/function/variab...). Then after the pop up closed you can get the values using variable_get in the main form. After reusing that correspoding form posted values make sure to delete that correspoding values using variable_del. If you feel this seems complicated then serialize the form values and use it in sessions by $_SESSION.