You are here

function openlayers_cck_validate in Openlayers 6.2

Same name and namespace in other branches
  1. 6 modules/openlayers_cck/openlayers_cck.module \openlayers_cck_validate()

FAPI validate function for custom element @ TODO: validation, etc

1 string reference to 'openlayers_cck_validate'
openlayers_cck_wkt_element_process in modules/openlayers_cck/openlayers_cck.module
Process an individual element.

File

modules/openlayers_cck/openlayers_cck.module, line 421
This file holds the main Drupal hook functions and private functions for the openlayers_cck module.

Code

function openlayers_cck_validate($element, &$form_state) {
  $field_key = $element['#columns'][0];
  $wkt_value = $element['#value']['openlayers_wkt'];
  $value = content_transpose_array_rows_cols(array(
    $field_key => array(
      $wkt_value,
    ),
  ));
  form_set_value($element, $value, $form_state);
}