Module Questions - changing the text area width in the form

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
ullal

Module Questions - changing the text area width in the form

Post by ullal »

I want to be able to change the width of the text area in the questions form in a flexible way i.e. depending on the resolution of the display monitor = available width of the content area.

I have found a way to change the width in a fixed way by modifying the lines 67-68 of the file function.default_form.php from

$smarty->assign('input_question',
  $this->CreateTextArea(false,$id,'','input_question'));

to

$textareawidt = 50;
$smarty->assign('input_question',
  $this->CreateTextArea(false,$id,'','input_question','','','','',$textareawidt));

I have set the width to a fixed value of 50 columns. This is based on the position of the parameter width in the definition of the function CreateTextArea in class.module.inc.php in which a preset value of 80 columns is used.

Is there any way to set the value of the variable $textareawidt? Is there any Smarty or CMS variable available that I could use to set this width?
cyberman

Re: Module Questions - changing the text area width in the form

Post by cyberman »

I think the easier way would be to style the width via CSS - you have only to add a class or id in template file :).
zgr
New Member
New Member
Posts: 3
Joined: Wed Sep 10, 2008 8:07 am

Re: Module Questions - changing the text area width in the form

Post by zgr »

But how with CSS in this case???
cyberman

Re: Module Questions - changing the text area width in the form

Post by cyberman »

Make a look at the html source and find out if the textarea has an id (for instance "example").

Then you can use

Code: Select all

textarea#example {width: 30em;}
to format it.
zgr
New Member
New Member
Posts: 3
Joined: Wed Sep 10, 2008 8:07 am

Re: Module Questions - changing the text area width in the form

Post by zgr »

There is no ID for the module-generated textarea.

But cascade from parent works fine:

Code: Select all

<td id="tapatch">{$input_question}</td>

Code: Select all

#tapatch textarea {width:100%;}
Locked

Return to “Modules/Add-Ons”