Forum

Thread tagged as: Suggestions, Field-Types

Perch Control Panel: unhelpfully constrained text field width

I'm new to Perch and really liking it.

One frustration is the constrained width of 280px imposed on text fields in the editor by .form .text in perch.css.

Text fields are perfect for things like meta title (~70 chars) and meta description (~140 chars), but 280px only shows about 50 characters at a time, regardless of viewport width.

It would be great if text fields were allowed to fill the width available to them. Perhaps a case for https://github.com/Heydon/fukol-grids form field rows with a fallback to floats?

I'm aware that the Perch Control Panel can be customised, but it would be great not to have to do so to address this.

Jonathan Schofield

Jonathan Schofield 0 points

  • 4 years ago
Duncan Revell

Duncan Revell 78 points
Registered Developer

Hi Jonathan,

I believe you can apply the size=" " attribute to text fields - as per textarea.

Give it a go...

Drew McLellan

Drew McLellan 2638 points
Perch Support

Have you experimented with the size attribute?

https://docs.grabaperch.com/perch/content/templates/sizing-textareas/

Thanks. Looks like that addresses my thought. Haven't got as far as creating a template yet, but I will do so -- I’m only using <?php perch_content('foo'); ?> so far.

size attribute works except xxl

All the others work - xs, s, m, l, xl

e.g.

~~ <perch:content id="arealink" type="text" label="some text" html="false" required="true" size="xl" /> ~~