I am using options to display a set different text modifications that can be applied to a poster product. The text descriptions are max 280 characters long and they were cut out by the default form.

I found the form in uc_attribute_admin.inc:


  $form['name'] = array(
    '#type' => 'textfield',
    '#title' => t('Name'),
    '#description' => t('This name will appear to customers on product add to cart forms.'),
    '#default_value' => $option->name,
    '#required' => TRUE,
    '#maxlength' => 300, // Added to accomodate my long descriptions.
    '#weight' => 0,
  );

The solution works fine up until I'll update the module, does anyone know how to solve this more elegantly?

Comments

tr’s picture

Category: feature » support

Write a hook_form_alter() to modify the admin form without having to hack uc_attribute.admin.inc.

tr’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.