You are here

function wordstream_stats_report_form in WordStream Keyword Tools 7

Same name and namespace in other branches
  1. 6 wordstream.module \wordstream_stats_report_form()

Generates main wordstream report form

Parameters

$form_state:

analysis struc $analysis:

bool $ajax:

1 string reference to 'wordstream_stats_report_form'
wordstream_keyword_stats_report_page in ./wordstream.module
Displays keyword stats report

File

./wordstream.module, line 197

Code

function wordstream_stats_report_form($form, $form_state, $analysis, $ajax = FALSE) {
  $form['pre_inputs'] = array(
    '#type' => 'markup',
    '#value' => '<div id="wordstream-form-inputs">',
  );
  $form['wordstream_keyword'] = array(
    '#type' => 'textfield',
    '#title' => t('Keyword'),
    '#default_value' => $analysis && $analysis['inputs']['wordstream_keyword'] ? $analysis['inputs']['wordstream_keyword'] : '',
  );
  $form['wordstream_stats_report_options'] = array(
    '#type' => 'fieldset',
    '#title' => t('Filters'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  );
  $form['wordstream_stats_report_options'] = array_merge($form['wordstream_stats_report_options'], wordstream_stats_report_form_options($analysis));
  $form['post_inputs'] = array(
    '#type' => 'markup',
    '#value' => '</div>',
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => 'Submit',
  );
  return $form;
}