function paymentform_field_widget_form_validate in Payment 7
Implements form validate callback for a paymentform_line_item field widget.
1 string reference to 'paymentform_field_widget_form_validate'
- paymentform_field_widget_form in modules/
paymentform/ paymentform.module - Implements hook_field_widget_form().
File
- modules/
paymentform/ paymentform.module, line 239 - Hook implementations and general functions.
Code
function paymentform_field_widget_form_validate(array $element, array &$form_state) {
$line_items = array();
foreach ($form_state['values'][$element['#field_name']][$element['#language']]['line_item'] as $line_item) {
$line_items[] = (array) $line_item;
}
form_set_value($element, $line_items, $form_state);
}