Skip to content

Instantly share code, notes, and snippets.

@HollyIT
Created November 12, 2011 16:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HollyIT/1360746 to your computer and use it in GitHub Desktop.
Save HollyIT/1360746 to your computer and use it in GitHub Desktop.
Drupal Form Declaration Snippet For NDDT
<?xml version="1.0" encoding="UTF-8"?>
<item>
<title>Declare Form</title>
<external></external>
<group>snippet</group>
<template><![CDATA[
/**
* Form builder; ${form_id}
*
* @see ${form_id}_validate()
* @see ${form_id}_submit()
*/
function ${form_id}($form, &$form_state){
${set_cursor}
}
/**
* Form validation handler for ${form_id}().
*/
function ${form_id}_validate($form, &$form_state){
${set_cursor}
}
/**
* Form submission handler for ${form_id}().
*/
function ${form_id}_submit($form, &$form_state){
${set_cursor}
}
]]></template>
<help></help>
</item>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment