phpmyadmin icon indicating copy to clipboard operation
phpmyadmin copied to clipboard

Increase input field width for varchar(255)

Open OlafvdSpek opened this issue 9 years ago • 11 comments

The input field width (on Insert Row page) is currently 40 chars, could this be increased? Perhaps the value fields could use all remaining width in the table.

OlafvdSpek avatar Aug 29 '17 09:08 OlafvdSpek

if you need input field more than 40 chars you can use text field instead of varchar.

deBilla avatar Aug 29 '17 21:08 deBilla

I don't need / want a text field.. varchar(255) is fine for me.

OlafvdSpek avatar Aug 30 '17 07:08 OlafvdSpek

You could set $cfg['CharEditing'] to 'textarea'.

stevenwdv avatar Aug 30 '17 12:08 stevenwdv

I think it's a textarea already, though I don't need / want a textarea for a single-line varchar. I'd prefer the defaults to be improved, so other users benefit too.

OlafvdSpek avatar Aug 30 '17 12:08 OlafvdSpek

Hey, The field is expandable so it isnt any problem.

ankitjain28may avatar Sep 20 '17 19:09 ankitjain28may

@ankitjain28may I think that's only with the textarea right?

stevenwdv avatar Sep 20 '17 20:09 stevenwdv

Yupp

ankitjain28may avatar Sep 20 '17 20:09 ankitjain28may

Agree completely with Oladvdspek. The old interface was pretty smooth for doing simple data entry for relatively small amounts of text. Now, with the need to manually mouse drag to expand the field even to read the very first line of text correctly, the interface is useless for doing quick data entry. To re-emphasize, the fact that it is "expandable" is not the solution here, it is the problem. For under a 1000 characters it is pretty simple to figure out exactly the right size of textarea, and there is plenty of screen space on modern monitors to expand.

This is problem that is simpler to show than to describe.

phpmyadmin_input_size_problem

Also, this is not technically an enhancement. Old versions of this interface were useable without a mouse for data entry. In the current interface text entered into the text area cannot even be read without using a mouse to expand the textarea. So this is a net loss of functionality, ergo should be classified as a bug.

Thank you for your work on this awesome product.

-FT

ftrotter avatar Feb 04 '18 07:02 ftrotter

@ibennetch, The function to add textareas in this page is getTextarea which resides in the file libraries/classes/InsertEdit.php. The rows and cols attributes are set using the global config set. A possible way to implement this enhancement would be to overwrite the rows and cols for the varchar fields. Would it be alright to do so??

aroralakshya avatar Mar 03 '18 21:03 aroralakshya

@OlafvdSpek @ftrotter The default size of the textarea can be changed with $cfg['CharTextareaCols'] and $cfg['CharTextareaRows']. For example:

$cfg['CharTextareaCols'] = 100;
$cfg['CharTextareaRows'] = 5;

MauricioFauth avatar Mar 31 '18 00:03 MauricioFauth

@mauriciofauth That's not the default size, that's the initial size. Setting the default size requires write access to the git repo. ;)

OlafvdSpek avatar Mar 31 '18 07:03 OlafvdSpek