hi im trying to add fields like checkbox in the attributes form using hook_form_alter its working and i can view the checkboxes i created but the problem is when I submit the form it redirects back to the page instead of the shopping cart, please help.
here is my code
<?php
function addq_form_alter($form_id, &$form) {
if(
$form_id == "uc_product_add_to_cart_form_22"){
$form['form_id'] = array(
array(
'#type' => 'checkbox',
'#title' => t('Option1'),
'#weight'=> -10,
'#value'=>t('test'),
'#id'=>t('edit-uc-product-add-to-cart-form-23'),
'#name'=> t('attributes[30]')
),
array(
'#type' => 'checkbox',
'#title' => t('Option2'),
'#weight'=> -10,
'#value'=>t('test'),
'#id'=>t('edit-uc-product-add-to-cart-form-23'),
'#name'=> t('attributes[30]')
),
'#weight'=> -10
);
}
}
?>
