function guestbook_form_entry_form in Guestbook 6
Same name and namespace in other branches
- 5.2 guestbook.module \guestbook_form_entry_form()
- 5 guestbook.module \guestbook_form_entry_form()
- 6.2 guestbook.module \guestbook_form_entry_form()
- 7.2 guestbook.module \guestbook_form_entry_form()
1 string reference to 'guestbook_form_entry_form'
- guestbook_form_entry in ./
guestbook.module - Guestbook form functions
File
- ./
guestbook.module, line 414
Code
function guestbook_form_entry_form($form_state, $uid, $display = '') {
global $user;
$form = array();
if ($user->uid == 0) {
// fields for anonymous poster
$form['anonname'] = array(
'#type' => 'textfield',
'#title' => t('Name'),
'#size' => 32,
'#maxlength' => 64,
'#required' => TRUE,
);
$anonymous_fields = (array) variable_get('guestbook_anonymous_fields', array(
'email',
'website',
));
if (in_array('email', $anonymous_fields)) {
$form['anonemail'] = array(
'#type' => 'textfield',
'#title' => t('E-mail'),
'#size' => 32,
'#maxlength' => 128,
);
}
if (in_array('website', $anonymous_fields)) {
$form['anonwebsite'] = array(
'#type' => 'textfield',
'#title' => t('Homepage'),
'#size' => 32,
'#maxlength' => 128,
);
}
}
$filter_tips = variable_get('guestbook_filter_tips', TRUE) ? _guestbook_form_filter_tips() : NULL;
$form['message'] = array(
'#type' => 'textarea',
'#title' => t('Message'),
'#cols' => 32,
'#rows' => GUESTBOOK_TEXTAREA_ROWS,
'#description' => $filter_tips,
'#required' => TRUE,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Send'),
);
$form['uid'] = array(
'#type' => 'value',
'#value' => $uid,
);
$form['access'] = array(
'#type' => 'value',
'#value' => _guestbook_access('post', $uid),
);
$form['display'] = array(
'#type' => 'value',
'#value' => $display,
);
return $form;
}