• Developer
Search »


Form Tools conscientiously namespaces all data to reduce the likelihood of conflict with other scripts that are running. Namespacing is done on every level of the script: database tables, main script sessions, API script sessions, API script function names, main script function names (JS and PHP), special form fields. Truth is, I've been burned so many times by other scripts not namespacing themselves properly, I got pretty sick of it!

  • All API functions begin with the ft_api_ prefix.
  • For the form processing / management functions, the API stores all sessions in the $_SESSION["form_tools_form"] key, but this can be changed if you're concerned about a conflict. Just see the ft_api_init_form_page function for information on how to set the session namespace. If you change it there, it will be reflected in all subsequent API functions (i.e. you'll need to pass your custom namespace to those as well)
  • Form fields that have special meaning to Form Tools all have a form_tools_ prefix, e.g. form_tools_initialize_form, form_tools_redirect_url, form_tools_form_id, form_tools_ignore_submission
  • All main script functions have a ft_ prefix.
  • The main script javascript files each have a namespace particular to the file. e.g. manage_submissions.js stores all the functions wrapped in an ms_ns object, with the functions defined as object attributes.
  • The database tables all have a namespace specified by the user during the installation script. This is defined in $g_table_prefix in your config.php file.