Array
(
[items] => Array
(
[0] => Array
(
[nid] => 164
[module] => uc_product
[remove] => Remove
[title] => Strokes1
[data] => a:4:{s:10:"attributes";a:0:{}s:9:"shippable";s:1:"0";s:12:"restrict_qty";s:1:"0";s:6:"module";s:10:"uc_product";}
[qty] => 2
[description] =>
[cart_item_id] => 200
)
[1] => Array
(
[nid] => 165
[module] => uc_product
[remove] => Remove
[title] => Strokes2
[data] => a:4:{s:10:"attributes";a:0:{}s:9:"shippable";s:1:"0";s:12:"restrict_qty";s:1:"0";s:6:"module";s:10:"uc_product";}
[qty] => 1
[description] =>
[cart_item_id] => 203
)
[2] => Array
(
[nid] => 166
[module] => uc_product
[remove] => Remove
[title] => Strokes3
[data] => a:4:{s:10:"attributes";a:0:{}s:9:"shippable";s:1:"0";s:12:"restrict_qty";s:1:"0";s:6:"module";s:10:"uc_product";}
[qty] => 1
[description] =>
[cart_item_id] => 204
)
)
[update] => Update cart
[checkout] => Checkout
[form_build_id] => form-5c5819d5418df14f08153f1ce15d6acc
[form_token] => 2341b9068b8ffb7454d267b22e572d7d
[form_id] => uc_cart_view_form
)
I'm using form_set_error to display the error messages if there is no product.
My Issue is:
For example, I am having 3 products in the checkout page.
When I clicks submit I need to validate that all the products are available.
Here, let us consider if the second product is not available I am showing the error message "Product Stroke 2 is not available".
But all the check boxes in the cart is highlighted
Because I had set form_set_error to items element.
How can I set form_set_error for every individual element.
What I have given to display error message:
form_set_error('items', 'Not available');
Kindly guide me how to resolve the issue. I am using ubercart module with drupal 6.