I have another question. Since I'm new to module writing and coding, as an exercise, I went through and modified my form by using hook form alter()
This is what I have now:
<?php
// $Id$
/**
* @file
* Module to hold my customizations to Ubercart
*/
/**
* Implementation of hook_form_alter()
*/
function disable_module_form_alter(&$form, &$form_state, $form_id ) {
if ($form_id == 'product_node_form') {
$form['base']['model']['#required'] = FALSE;
$form ['base']['prices']['sell_price']['#required'] = FALSE;
//modify attributes of existing fields
$form['base']['prices']['sell_price'] = array('#type' => 'hidden');
$form['base']['prices']['cost'] = array('#type' => 'hidden');
$form['base']['prices']['list_price'] = array('#type' => 'hidden');
$form['base']['shippable'] = array('#type' => 'hidden');
$form['base']['weight'] = array('#type' => 'hidden');
$form['base']['dimensions'] = array('#type' => 'hidden');
$form['base']['pkg_qty'] = array('#type' => 'hidden');
$form['base']['default_qty'] = array('#type' => 'hidden');
$form['base']['ordering'] = array('#type' => 'hidden');
}
}The only field I left in the "Product Information" fieldset was the SKU field. My new question is , how do i expand the field set to extend around all of my other unique product information fields that I have added.
I found the code easily in the ubercart product module, but I'm not sure what to do to extend it. I think it has something to do with adding the variable [base] to all my new fields but I don't know how to do it.
Ubercart code
$form['base'] = array('#type' => 'fieldset',
'#title' => t('Product information'),
'#collapsible' => true,
'#collapsed' => false,
'#weight' => -1,
'#attributes' => array('class' => 'product-field'),
);I know how to add a custom filed to the file and make it go in the same fieldset. I found out here: http://www.molecularsciences.org/drupal/modifying_your_forms But, what do i do if i have unique fields that i made in cck that i want the field set to go around?
Thanks
raspberryheaven




Joined: 09/23/2008