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?
Module Questions - changing the text area width in the form
Re: Module Questions - changing the text area width in the form
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
.

Re: Module Questions - changing the text area width in the form
But how with CSS in this case???
Re: Module Questions - changing the text area width in the form
Make a look at the html source and find out if the textarea has an id (for instance "example").
Then you can use
to format it.
Then you can use
Code: Select all
textarea#example {width: 30em;}
Re: Module Questions - changing the text area width in the form
There is no ID for the module-generated textarea.
But cascade from parent works fine:
But cascade from parent works fine:
Code: Select all
<td id="tapatch">{$input_question}</td>
Code: Select all
#tapatch textarea {width:100%;}