joomla 1.5 set width of poll results dropdown select field

Jooimla 1.5 has a basic, but useful component built in to create basic polls. Theses polls can be used to gather information and feedback on anything you want.

Users can access the “Results” page and can see the results of all your polls by selecting the correct poll from the drop down box on the “Results” Page.

If you have a long question the drop down box cut’s the question and you can read the whole question of the poll.

To increase the size of the Poll drop down in the Poll’s “Results page…do the following

1. Go to /components/com_poll/views/poll/view.html.php
2. Make a backup of the file
3. Change the width value in the below code from 200px to whatever you want

// dropdown output
$lists = array();
$lists['polls'] = JHTML::_('select.genericlist', $pList, 'id',
'class="inputbox" size="1" style="width:200px" onchange="if (this.options[selectedIndex].value != \'\') {document.location.href=this.options[selectedIndex].value}"',
'url', 'title',
JRoute::_('index.php?option=com_poll&id='.$poll->id.':'.$poll->alias)
);

to

// dropdown output
$lists = array();
$lists['polls'] = JHTML::_('select.genericlist', $pList, 'id',
'class="inputbox" size="1" style="width:500px" onchange="if (this.options[selectedIndex].value != \'\') {document.location.href=this.options[selectedIndex].value}"',
'url', 'title',
JRoute::_('index.php?option=com_poll&id='.$poll->id.':'.$poll->alias)
);

4. Save and upload.

Hope this helps

Share
This entry was posted in Joomla and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Spam protection by WP Captcha-Free