You are here

function clientside_validation_settings_enable in Clientside Validation 7

Same name and namespace in other branches
  1. 7.2 clientside_validation.module \clientside_validation_settings_enable()
1 call to clientside_validation_settings_enable()
clientside_validation_settings_confirmation_form_submit in ./clientside_validation.admin.inc

File

./clientside_validation.module, line 1413
Add client side validation to forms.

Code

function clientside_validation_settings_enable($cvs_type, $cvs_formid) {
  if (!db_table_exists('clientside_validation_settings')) {
    drupal_set_message(t("You need to run the database update script so that Clientside Validation can function properly. Click !here to run the database update script.", array(
      '!here' => l('here', 'update.php'),
    )));
    return;
  }
  db_update('clientside_validation_settings')
    ->fields(array(
    'status' => 1,
  ))
    ->condition('type', $cvs_type)
    ->condition('form_id', $cvs_formid)
    ->execute();
}