I have created a Webform with some terms & condition. I have added this webform in node/upload page. When user access node/upload page webform comes as overlay on the page. When user selects all terms & condition and submits it redirects to another page which as close link. When close link is clicked webform hides.
What I want is instead clicking on close link to hide the webform. When user submits the terms & conditions the webform must be hidden. How can i achieve this. I have added screen shot of webforms.
I have added this code to get the webform in node/upload page
if (!isset($user->data['guided'])) {
$form['#attached']['js'][] = drupal_get_path('module', 'my_module') . '/js/my_module_ajax.js';
}
ctools_include('modal');
ctools_modal_add_js();
if (!isset($user->data['guided'])) {
$form['guideline'] = array(
'#markup' => '<p>' . t('Review and follow the guidelines outlined in the <a href="@guideline-page" class="ctools-use-modal">Submission guidelines</a> before uploading an item.', array('@guideline-page' => url('modal_forms/nojs/webform/' . 31))) . '</p>',
'#weight' => -0.01,
);
}