Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

input text form size


majerfra

Recommended Posts

Posted

hallo,

any clue where to change lenght of input text form field in create account?

not the numbers of chars, lenght the field, please

Posted

If you know some HTML and PHP you can fiddle with this function located in includes/functions/html_output.php

 

function tep_draw_input_field

 

Have fun!

CP

Posted

you don't have to change the function just pass the 3rd and 4th arguments to tep_draw_input_field to specify size and max length respectively.

Posted
you don't have to change the function just pass the 3rd and 4th arguments to tep_draw_input_field to specify size and max length respectively.

 

hello,

can you please point me what to do. Here is my part of code, we talk:

 

// Output a form input field

function tep_draw_input_field($name, $value = '', $parameters = '', $type = 'text', $reinsert_value = true) {

$field = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"';

 

if ( (isset($GLOBALS[$name])) && ($reinsert_value == true) ) {

$field .= ' value="' . tep_output_string(stripslashes($GLOBALS[$name])) . '"';

} elseif (tep_not_null($value)) {

$field .= ' value="' . tep_output_string($value) . '"';

}

 

if (tep_not_null($parameters)) $field .= ' ' . $parameters;

 

$field .= '>';

 

return $field;

}

 

////

 

 

thanx in advance

Posted

<?php echo tep_draw_input_field('payment', '', 'maxlength="255", size="30"'); ?>

 

see size="30" ? change it to whatever you want.

Posted

Hello,

it work for me in create account form, but in admin area, i'm not able to resize the field to view and print full customers data ... i need to resize the fields in admin area

Posted

which field specifically, are you trying to do?

Posted
which field specifically, are you trying to do?

 

All the fields in admin/customer/edit

if the company name or e-mail is longer then default text form field ...

 

i have edit html_output.php in admin area too, but it resize only extra fields i have added with contribution.!!!

 

 

any idea ?

Posted

well, if you want to change globally on admin (ALL inputs), 1 easy edit (providing your inputs use the tep function)

 

 

in admin/includes/functions/html_output.php, look for:

////

// Output a form input field

function tep_draw_input_field($name, $value = '', $parameters = '', $required = false, $type = 'text', $reinsert_value = true) {

$field = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"';

 

 

change to:

////

// Output a form input field

function tep_draw_input_field($name, $value = '', $parameters = '', $required = false, $type = 'text', $reinsert_value = true) {

$field = '<input type="' . tep_output_string($type) . '" size="70" name="' . tep_output_string($name) . '"';

 

where i made it bold, just adjust the number to whatever size field you want (smaller number = smaller field)

 

 

 

 

 

 

if this is what you already did and your form sizes aren't changing, the inputs you're concerned with probably aren't using the tep function, so you will need to manually edit those inputs by whatever filename they're in.

Posted
well, if you want to change globally on admin (ALL inputs), 1 easy edit (providing your inputs use the tep function)

in admin/includes/functions/html_output.php, look for:

change to:

where i made it bold, just adjust the number to whatever size field you want (smaller number = smaller field)

if this is what you already did and your form sizes aren't changing, the inputs you're concerned with probably aren't using the tep function, so you will need to manually edit those inputs by whatever filename they're in.

 

This one work fine!!!!!

 

Thank you so much

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...