The links to open a form needs the class "colorbox-load". The URL should look like this.
-"/colorbox/form/[form_id]?width=[with_in_pixel]&height=[height_in_pixel]".
+"/colorbox/form/[form_id]?destination=[path_to_send_user_to_after_submit]&width=[with_in_pixel]&height=[height_in_pixel]".
Here is an example where the user register form is opened in an
500 by 250 pixel Colorbox.
-<a class="colorbox-load" href="/colorbox/form/user_register?width=500&height=250">Create new account</a>
+<a class="colorbox-load" href="/colorbox/form/user_register_form?destination=user&width=500&height=250">Create new account</a>
Load inline content in a Colorbox:
'#type' => 'checkbox',
'#title' => t('Enable Colorbox load'),
'#default_value' => variable_get('colorbox_load', 0),
- '#description' => t('This enables custom links that can open forms and paths in a Colorbox. Add the class "colorbox-load" to the link and build the url like this for forms "/colorbox/form/[form_id]?width=500&height=500" and like this for paths "[path]?width=500&height=500&iframe=true". If you do not want the box to persist set iframe to false. Other modules may activate this for easy Colorbox integration.'),
+ '#description' => t('This enables custom links that can open forms and paths in a Colorbox. Add the class "colorbox-load" to the link and build the url like this for forms "/colorbox/form/[form_id]?destination=some_path&width=500&height=500" and like this for paths "[path]?width=500&height=500&iframe=true". If you do not want the box to persist set iframe to false. Other modules may activate this for easy Colorbox integration.'),
);
$form['colorbox_extra_settings']['colorbox_inline'] = array(
'#type' => 'checkbox',