Monday, July 12, 2010

How to add custom input type in RS-Form in joomla rather than textboxes(when you edit form's data)

For this you need to go
\components\com_rsform\controller\ajax.js
and go to function editRow(id, total)
in this function you can add custom input type
For an example ::
function editRow(id, total)
{
 for(var i=0; i < total; i = i +1)
 {
  value = document.getElementById("textarea-" + id + "-" + i).innerHTML;

  if (value.match(/\n/ig))
  {
   
    document.getElementById("row-" + id + "-" + i).innerHTML = "";
  }
  else
  { 
    if(i=="3"){
      document.getElementById("row-" + id + "-" + i).innerHTML = "";
     
     }
    else{
   document.getElementById("row-" + id + "-" + i).innerHTML = "";        }
  }
 }

 document.getElementById("act-" + id).innerHTML = "" + "" + "";
}

In this code I have added dropdown when i==3 using code::
 if(i=="3"){
      document.getElementById("row-" + id + "-" + i).innerHTML = "";
     
     }
    else{ 

0 comments:

Post a Comment