Jump to:

2002 Posts in 1422 Topics by 616 members

Form Questions

SilverStripe Forums » Form Questions » setting a 'col' value in userforms v0.2.1

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1305 Views
  • MattyJ
    Avatar
    Community Member
    11 Posts

    setting a 'col' value in userforms v0.2.1 Link to this post

    Hi,
    I can't seem to find where to specify the 'cols' width of a <textarea> in userforms module. Rows is easy as it's in the user interface, but cols I cannot find. What file do I need to edit in the userforms module (seems to be stuck at cols='20').
    Thanks
    Matt

  • _Vince
    Avatar
    Community Member
    158 Posts

    Re: setting a 'col' value in userforms v0.2.1 Link to this post

    I think you have to edit form.css for whatever theme you are using. The input and the middleColumn values and whatever else constrains the size.

    You can probably find any additional stuff to edit by looking at the page with Firebug.

  • MattyJ
    Avatar
    Community Member
    11 Posts

    Re: setting a 'col' value in userforms v0.2.1 Link to this post

    cheers, none of those values seem to make a difference to the col width though. In firebug I can edit the HTML cols value below and that does the trick, but still can't find where this value is set within userforms?

    <textarea cols="20" rows="6" name="EditableTextField9" class=" requiredField" id="Form_Form_EditableTextField9"></textarea>

  • planetbrain
    Avatar
    Community Member
    12 Posts

    Re: setting a 'col' value in userforms v0.2.1 Link to this post

    Was a solution to this ever found.
    I've just ran into the same problem and would like to change the col value if possibler.

  • Sherry
    Avatar
    Community Member
    4 Posts

    Re: setting a 'col' value in userforms v0.2.1 Link to this post

    I had to remove the textarea width setting in the theme's style.css. (I guess re-ordering the style sheets such that the form stylesheet comes after the style stylesheet in the .ss would work as well). That allowed the textarea width in the form.css to be applied.

    Or removing textarea width in both stylesheets and set the col width parm to return new TextareaField($this->Name, $this->Title, $this->getSetting('Rows'), COLWIDTHHERE); in the userforms editabletextfield.php worked for me, also.

    1305 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.