',
'#value' => t('@type: @class
Settings:
!settings
', array('@type' => ucfirst($data['type']), '@class' => $data['class'], '!settings' => $settings)),
'#suffix' => '
',
);
$form[$data['step']][$key . $uniqid]['text'] = array(
'#type' => 'markup',
'#title' => ucfirst($data['type']) .': '. $data['class'],
'#description' => t('Settings:
!settings', array('!settings' => $settings)),
'#value' => $data['value'] . '
'. check_plain($data['value']),
'#prefix' => '
'. t('As it appears to users:') .'',
'#suffix' => '
',
);
$zebra = ($zebra == 'flexifilter-even') ? 'flexifilter-odd' : 'flexifilter-even';
}
}
return $form;
}
function flexifilter_filter_preview_form_submit($form, &$form_state) {
variable_set('flexifilter_preview', TRUE);
variable_set('flexifilter_preview_text', array());
$form_state['storage']['input'] = $form_state['values']['input'];
$text = flexifilter_invoke_components($form_state['values']['flexifilter']['components'], 'prepare', $form_state['values']['input']);
flexifilter_invoke_components($form_state['values']['flexifilter']['components'], 'process', $text);
$form_state['storage']['preview'] = TRUE;
$form_state['storage']['data'] = (variable_get('flexifilter_preview_text', array()));
variable_del('flexifilter_preview');
variable_del('flexifilter_preview_text');
}