Error message

Deprecated function: Array and string offset access syntax with curly braces is deprecated in include_once() (line 20 of /home/emun/public_html/includes/file.phar.inc).

Form API introduction for the Houston Drupal Users Group

Thu, 01/19/2017 - 11:41 -- admin

As part of our commitment to the Drupal community, we've been leading demonstrations and explanations of parts of the Drupal system. This week we covered an introduction to the Form API.

Form API Basics

Why should I use Form API instead of just printing the form?

  • Form API is extensible and interoperable- Your exposed elements could be submitted via AJAX or edited on the fly by theming functions. Without you having to write a single additional line of code.
  • Form API is safe(r) - FAPI provides validation features and causes you to consider the security implications of the data you are working with.
  • It's the Drupal way

 

Check out the attached presentation for more information, and feel free to leave a comment with any questions that you might have.  Note also that I've attached some simple sample code for you to play with. It's heavily commented and ready to go.