You are here

function uc_textfield in Ubercart 7.3

Same name and namespace in other branches
  1. 5 uc_store/uc_store.module \uc_textfield()
  2. 6.2 uc_store/uc_store.module \uc_textfield()

A simple Forms API textfield generator...

4 calls to uc_textfield()
uc_checkout_pane_customer in uc_cart/uc_cart_checkout_pane.inc
Gets the user's email address for login.
uc_payment_method_check in payment/uc_payment_pack/uc_payment_pack.module
Payment method callback for the "Check" payment method.
uc_shipping_address_form in shipping/uc_shipping/uc_shipping.module
Helper function for addresses in forms.
uc_store_settings_form in uc_store/uc_store.admin.inc
Form builder for store settings.

File

uc_store/uc_store.module, line 1269
Contains global Ubercart functions and store administration functionality.

Code

function uc_textfield($title, $default = NULL, $required = TRUE, $description = NULL, $maxlength = 32, $size = 32) {
  if (is_null($title) || empty($title)) {
    return NULL;
  }
  $textfield = array(
    '#type' => 'textfield',
    '#title' => $title,
    '#description' => $description,
    '#size' => $size,
    '#maxlength' => $maxlength,
    '#required' => $required,
    '#default_value' => $default,
  );
  return $textfield;
}