Re: Re: Re: Re: Can I extend the fieldset to go around my custom

haggis's picture
Offline
Joined: 02/22/2009
Juice: 27
Re: Re: Re: Re: Can I extend the fieldset to go around my custom

Do you have any solution? I'm trying to add an additional price-field to the form:

<?php
function testmodule_form_alter(&$form, &$form_state, $form_id) {
  if (
$form_id == "product_node_form") {
   
$form['base']['prices']['sell_price_normal'] = array (
                   
'#type' => 'textfield',
                   
'#title' => t('Normal price'),
                   
'#required' => 1,
                   
'#default_value' => 0,
                   
'#description' => t('Price without reduction.'),
                   
'#weight' => 2,
                   
'#size' => 8,
                   
'#maxlength' => 10,
                   
'#field_prefix' => '$',
                   
'#field_suffix' => '',
                    );
  }
}
?>

It's in $form but it isn't visible at the edit-form. Any suggestions?

edit: putting it into $form['base']['sell_price_normal'] works.
don't know why $form['base']['prices']['sell_price_normal'] does not :/