Saturday, March 12, 2016

Removing Mad4media copyright Link On Joomla Proforms

I installed Proforms Basic component which is excellent form builder component for joomla and it's also free.
But problem is this component by default has backlink / copyright link under form.Which is very odd and annoying.

It's very hard to remove that link. I was searching every file of this component but could not find that backlink. I spent several hours to solve this. 1st i found they use JavaScript for this backlink and that was encrypt so it's hard to find in which file that put that.
At last  somehow  i found a solution.

1. Go to site/component/com_proforms/views/form/tmpl open default.php file
check line 67 <div class='proformsFormWrap'  edit to  proformsFormWrap1

2. Go to site/component/com_proforms/css open responsivesystem.css file
replace all proformsFormWrap   to  proformsFormWrap1

That's it.
Thanks

Wednesday, February 24, 2016

Count and display number of characters in a textbox using Javascript & Jquery

We could do this in jQuery, assuming we want the character count displayed in a div with id="characters"


<textarea></textarea>
<span id="characters"><span>
$('textarea').keyup(updateCount);
$('textarea').keydown(updateCount);

function updateCount() {
    var cs = $(this).val().length;
    $('#characters').text(cs);
}
This is the most easiest way to do it.

Saturday, December 26, 2015

Print variable on top of the page where variable is defined bottom - php

Some time we need to print/echo a variable on the top of the page but that variable need to define after a long code bottom of the page. as we know in PHP all instructions are executed sequentially so we cannot read a variable that hasn't yet been defined. 

We can do it easily using jquery. Example

We need to print a total discount value top of the page 

<p> Total Discount : <span id="demo"></span> USD </p>

But the sum of discount value need to find after a long code 
...............................php  code bla bla bla to find a variable $sum_discount  value..................
...............................php  code bla bla bla to find a variable $sum_discount  value..................

Then asign  that value within a jquery 

 <?php    
     echo "<script type='text/javascript'> 
                        document.getElementById('demo').innerHTML = ".$sum_discount.";     
                </script>";
?>

Total Pageviews