You are here

function authcache_example_block_form in Authenticated User Page Caching (Authcache) 6

Same name and namespace in other branches
  1. 7 modules/authcache_example/authcache_example.module \authcache_example_block_form()

Form to modify user's block

1 string reference to 'authcache_example_block_form'
authcache_example_menu in modules/authcache_example/authcache_example.module
Implentation of hook_menu()

File

modules/authcache_example/authcache_example.module, line 29
authcache_example.module

Code

function authcache_example_block_form($form_state, $account) {
  $text = db_result(db_query("SELECT block_text FROM {authcache_example} WHERE uid = %d", $account->uid));
  $form['block_text'] = array(
    '#title' => 'Your Custom Block Text',
    '#type' => 'textarea',
    '#default_value' => $text ? $text : '',
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => 'Save',
  );
  return $form;
}