You are here

function dfp_admin_form_validate in Doubleclick for Publishers (DFP) 7.2

Same name and namespace in other branches
  1. 7 dfp.admin.inc \dfp_admin_form_validate()

Submit handler for the global DFP settings form.

1 string reference to 'dfp_admin_form_validate'
dfp_admin_settings in ./dfp.admin.inc
Form builder for the global DFP settings form.

File

./dfp.admin.inc, line 276
Admin forms and functinality for DFP ads.

Code

function dfp_admin_form_validate($element, &$form_state) {
  $settings = $element['global_tag_settings'];
  if (!empty($settings['dfp_click_url']['#value']) && $settings['dfp_async_rendering']['#value'] == 1) {
    form_error($settings['dfp_click_url'], t('Setting a click URL does not work with async rendering.'));
  }

  // Only allow DFP token cache if Entity modified is enabled.
  if ($settings['dfp_token_cache_enabled']['#value'] == TRUE && !function_exists('entity_modified_last')) {
    form_error($settings['dfp_token_cache_enabled'], t('DFP token cache requires Entity Modified module.'));
  }
}