Hello,
In the Offices example, GroceryCrud generates the following input code for the phone field :
<input type="text" maxlength="50" value="+61 2 9264 2451" name="phone" id="field-phone">
However, in the callback_edit_field example, the function edit_field_callback_1 has only two parameters $value and $primary_key, to modify the input :
function edit_field_callback_1($value, $primary_key) { return '+30 <input type="text" maxlength="50" value="'.$value.'" name="phone" style="width:462px">'; }
Is there a way to get the other attributes (type, maxlength ...) ?
For instance :
function edit_field_callback_1($value, $primary_key, $type, $name, $style, $maxlength) { return '+30 <input type="'.$type.'" maxlength="'.$maxlength.'" value="'.$value.'" name="'.$name.'" style="'.$style.'">'; }