Textarea autogrow plugin
For our next example, we are going to see a textarea autogrow plugin. This is going to be an easy one to use, but very useful in the insert and edit forms of our component. This time we are going to use the plugin from Antti Kaihola and we can find it here:
http://github.com/akaihola/jquery-simpleautogrow.
Download the packed file. Inside we will find a file called
jquery.simpleautogrow.js
. Place this file in the
administrator/components/com_tinynews/js
folder. After placing the
file, we need to modify our form.php
template file placed
at administrator/components/com_tinynews/views/addnews/tmpl/
.
Remember how we declared our previous script? We are going to do something similar
now:
<?php defined('_JEXEC') or die('Restricted access'); $js = JURI::base().'components/com_tinynews/js/jquery.simpleautogrow.js'; $document =&...