Make SQL queries in Drupal, make HTTP requests to external websites, and use this data to validate a form.
Objectives and Prerequisites
You will need the following knowledge and skills. If you need a review, check out the Resources section at the bottom of this page.
- Understand how to check for the existence of a property on a node.
- Create a validation hook for a form.
- Use an external API to access data to use for validation.
- All database transactions happen via an abstraction layer.
- Making requests to external URLs is simple in Drupal 7.
- Video: Creating, Submitting and Validating a Simple Form (Drupalize.Me)
- Video: An Overview of the Database Layer in Drupal 7 (Drupalize.Me)
- Video: Querying the Database with db_select() (Drupalize.Me)
- API Documentation: Database abstraction layer (api.drupal.org)
- API Documentation: drupal_http_request (api.drupal.org)