Code Monkey home page Code Monkey logo

Comments (7)

n1crack avatar n1crack commented on June 9, 2024
$this->datatables->add_column('email', '$1', 'strtolower(email)') // php functions
$this->datatables->add_column('email', '$1', 'custom_email(email)')  // custom functions

for custum functions u need to put them in a helper file..

function custom_email($val)
{
  return substr($val, 0, 3) . '..' . strstr($val, "@");
}

from ignited-datatables.

solver80 avatar solver80 commented on June 9, 2024

Yes I know about helper files...

I need 2 parameters in helper file:

->add_column('face_number_3','$1','customer_confirmed(face_status,face_id)')
function customer_confirmed($status,$id)
{
  if($status=='Yes'){$output='Confirmed';}
  if($status=='No'){$output='<a class="btn btn-mini btn-warning" data-toggle="modal" href="#?page=customers-database&id=$id&action=confirm">Confirm</a>';}
  return $output;
}

But that doesnt populate any data.

from ignited-datatables.

n1crack avatar n1crack commented on June 9, 2024

can you show me your php setup?

from ignited-datatables.

solver80 avatar solver80 commented on June 9, 2024

What you mean? What exacly you would like to see?

from ignited-datatables.

n1crack avatar n1crack commented on June 9, 2024

can you show me your ajax controller ? So i can get an idea..

from ignited-datatables.

AhmedSamy avatar AhmedSamy commented on June 9, 2024

@solver80 I have used helper function with 2 parameters with no problem

check that, where image_size is CI Helper function

$this->datatables->select('brand_name,cat_name,cat_id,cat_pic_url')
->add_column('Picture',img('uploads/categories/$1'),'image_size(cat_pic_url, "100x100")')

from ignited-datatables.

cryogenix avatar cryogenix commented on June 9, 2024

closing this for inactivity.

from ignited-datatables.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.