I have this working but when I click on the help icon it does not open it in a popup window.

function better_ui_form_alter(&$form, $form_state, $form_id) {
  switch ($form_id) {
    case 'blog_node_form':
      $output = theme('advanced_help_topic', array(
        'module' => 'better_ui',
        'topic' => 'hr-help',
      ));
      $form['title']['#title'] .= $output;
      break;
  }
}

I know my setup can handle popups because if I use this straight code the popup appears:


$form['field_show_sidebar_2nd'][und]['#description'] =
  ' <a href="/help/better_ui/show-sidebar?popup=1"
    class="better-ui-help advanced-help-link"
    onclick="var w=window.open(this.href, &#039;advanced_help_window&#039;,
    &#039;width=500,height=500,scrollbars,resizable&#039;);
    w.focus(); return false;" title="Show Sidebar"><span> <br>
    Help</span></a></div> ';

Any thoughts? Thanks.

Comments

gettysburger’s picture

Issue summary: View changes
gettysburger’s picture

Issue summary: View changes
gisle’s picture

Issue summary: View changes

Made code block human readable.

gisle’s picture

Status: Active » Closed (outdated)

Unable to reproduce. It is 4 years ago, and no follow up so I am closing as outdated.