function twit_submit_block_form in Heartbeat 8
Provide simple form for visitor to submit tweets
1 string reference to 'twit_submit_block_form'
- twit_submit_block_view in modules/
statusmessage/ includes/ twit.php
File
- modules/
statusmessage/ includes/ twit.php, line 207
Code
function twit_submit_block_form() {
$form = array();
$form['twit_fieldset'] = array(
'#type' => 'fieldset',
'#title' => t('SUBMIT TWEET'),
'#prefix' => '<div id="terms-fieldset-wrapper">',
'#suffix' => '</div>',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#ajax' => array(
'callback' => 'twit_submit_block_submit_callback',
),
);
$form['twit_fieldset']['tweet'] = array(
'#type' => 'textarea',
'#title' => t('Tweet'),
'#description' => t('Please enter Tweet URL'),
'#maxlength' => 80,
'#size' => 25,
'#attributes' => array(
'onchange' => 'tweetCheck(this.form.tweet.value)',
),
);
$form['twit_fieldset']['submit'] = array(
'#type' => 'submit',
'#value' => 'Submit',
'#id' => 'twitSubmitBtn',
'#ajax' => array(
'callback' => 'twit_submit_block_submit_callback',
),
);
$form['twit-notification'] = array(
'#prefix' => '<div id="twit-notification">',
'#suffix' => '</div>',
);
$form['twit-check'] = array(
'#prefix' => '<div id="twit-check">',
'#suffix' => '</div>',
);
$form['#attached']['js'][] = array(
'type' => 'inline',
'data' => drupal_get_path('module', 'twit_submit') . '/twit_submit.js',
'type' => 'file',
);
return $form;
}