I have several text fields that all have similar widths.
I currently create a separate callback function for each of them using the following code:
function clock_id_callback($value, $primary_key)
{
return '<input type="text" value="'.$value.'" name="clock_id" maxlength="11" style="width:80px">';
}
The only difference among them is the "name" value. Is there anyway to send the "name" as a third parameter so one function can be utilized rather than several? Example:
function edit_fields_callback($value, $primary_key,$field_name)
{
return '<input type="text" value="'.$value.'" name="'.$field_name.'" maxlength="11" style="width:80px">';
}
It seems like such a waste to duplicate the code.
edit field callback
Started by tomvsi, 06 November 2012 - 18:18 PM
- Single Page
Posted 06 November 2012 - 18:18 PM