You are here

function hide_submit_js_loaded in Hide submit button 6

Same name and namespace in other branches
  1. 7 hide_submit.module \hide_submit_js_loaded()

Memory function for checking or setting script status

@returns TRUE or FALSE indicating script was loaded

Parameters

mixed $status - new status or NULL to leave status unchanged:

2 calls to hide_submit_js_loaded()
hide_submit_form_alter in ./hide_submit.module
Implementation of hook_form_alter
hide_submit_init in ./hide_submit.module
Implementation of hook_init

File

./hide_submit.module, line 116
Hide the submit button after clicked to prevent/reduce duplicate postings.

Code

function hide_submit_js_loaded($status = NULL) {
  static $hide_submit_js_loaded = FALSE;
  if ($status !== NULL) {
    $hide_submit_js_loaded = $status;
  }
  return $hide_submit_js_loaded;
}