# bit-form/2.9.1/includes/Core/Database/FallbackModel.php

Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator &amp; Custom Form Builder, version 2.9.1. 48 lines.

- Page: https://pluginprobe.com/plugins/bit-form/2.9.1/code/includes/Core/Database/FallbackModel.php
- Raw: https://pluginprobe.com/plugins/bit-form/2.9.1/raw/includes/Core/Database/FallbackModel.php
- Modified: 2023-07-16T07:55:48+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/bit-form/2.9.1/code/includes/Core/Database/FallbackModel.php#L10-L20`.

```php
<?php

namespace BitCode\BitForm\Core\Database;

class FallbackModel extends Model
{
  public function changeMetaKey($fieldKey, $name)
  {
    $prefix = $this->app_db->prefix;
    $sql = "UPDATE {$prefix}bitforms_form_entrymeta SET meta_key = '{$fieldKey}' WHERE meta_key = '{$fieldKey}{$name}'";

    return $this->execute($sql);
  }

  public function changeIntegKey($integId, $conf)
  {
    $prefix = $this->app_db->prefix;
    $sql = "UPDATE {$prefix}bitforms_integration SET integration_details = '%s' WHERE id = %d";
    $values = [$conf, $integId];

    return $this->execute($sql, $values)->getResult();
  }

  public function changeWorkflowKey($workflowId, $logics, $workflowAction)
  {
    $prefix = $this->app_db->prefix;
    $sql = "UPDATE {$prefix}bitforms_workflows SET workflow_condition = '%s', workflow_action = '%s' WHERE id = %d";
    $values = [$logics, $workflowAction, $workflowId];
    return $this->execute($sql, $values)->getResult();
  }

  public function changeSuccessMessageKey($messageId, $title, $content, $config)
  {
    $prefix = $this->app_db->prefix;
    $sql = "UPDATE {$prefix}bitforms_success_messages SET message_title = '%s', message_content = '%s', message_config = '%s' WHERE id = %d";
    $values = [$title, $content, $config, $messageId];
    return $this->execute($sql, $values)->getResult();
  }

  public function changeEmailTempKey($tempId, $sub, $body)
  {
    $prefix = $this->app_db->prefix;
    $sql = "UPDATE {$prefix}bitforms_email_template SET sub = '%s', body = '%s' WHERE id = %d";
    $values = [$sub, $body, $tempId];
    return $this->execute($sql, $values)->getResult();
  }
}

```
