Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // the caller
- $form = drupal_get_form('myform', $record_id);
- // in the form builder...
- function myform($form, &$form_state, $record_id) {
- // db query the table for that record id
- // populate form default values if record found
- // example
- $form['email']['#default_value'] = $query_result ? $query_result['email'] : NULL;
- }
Add Comment
Please, Sign In to add comment