Exemplo n.º 1
0
function contactform(cs_form $form, &$form_state)
{
    $form->set_inline_errors(TRUE);
    // $form = new cs_form(array(
    //   'form_id' => 'contact',
    // ));
    $form->add_field('fieldset', array('type' => 'tabs', 'title' => 'Contact'))->add_tab('Contact')->add_field('name', array('type' => 'textfield', 'validate' => array('required'), 'preprocess' => array('trim'), 'title' => 'Your name'))->add_field('email', array('type' => 'textfield', 'validate' => array('required', 'email'), 'title' => 'Your email address'))->add_field('message', array('type' => 'textarea', 'postprocess' => array('xss'), 'title' => 'Your message'))->add_field('submit', array('type' => 'submit'));
    return $form;
}