You are here

function formdefaults_getform in Form Defaults 7

Same name and namespace in other branches
  1. 8 formdefaults.module \formdefaults_getform()
  2. 5.3 formdefaults.module \formdefaults_getform()
  3. 5 formdefaults.module \formdefaults_getform()
  4. 5.2 formdefaults.module \formdefaults_getform()
  5. 6.2 formdefaults.module \formdefaults_getform()
  6. 6 formdefaults.module \formdefaults_getform()

Retrieve from alterations from the database @formid the form id to retrieve.

6 calls to formdefaults_getform()
formdefaults_edit_field in ./formdefaults.admin.inc
Form to edit the field title and description.
formdefaults_edit_field_submit in ./formdefaults.admin.inc
formdefaults_edit_form in ./formdefaults.admin.inc
formdefaults_edit_form_submit in ./formdefaults.admin.inc
formdefaults_form_alter in ./formdefaults.module
implements hook_form_alter

... See full list

File

./formdefaults.module, line 304

Code

function formdefaults_getform($formid) {
  $result = db_query('SELECT * FROM {formdefaults_forms} WHERE formid = :formid', array(
    ':formid' => $formid,
  ));
  $formarray = array();
  foreach ($result as $form) {
    $formarray = unserialize($form->formdata);
  }
  return $formarray;
}