I need to get the size of the field to put the size of the input
example <input type='text' size='10' name='field'>
⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠
Posted 02 August 2013 - 16:49 PM
I need to get the size of the field to put the size of the input
example <input type='text' size='10' name='field'>
Posted 02 August 2013 - 22:57 PM
Use your own model and get this value from the database.
[member=ELJUSTICEIRO] check here how to get the size.
Posted 03 August 2013 - 03:20 AM
..or, use callback_field.
Posted 03 August 2013 - 04:39 AM
[member=heruprambadi], how do you get the size of the field from the callback_field???
Posted 03 August 2013 - 04:55 AM
size what you mean is the same thing with field width right ?
i use callback_field like this :
public function field_callback_1($value){ return '<input type="text" maxlength="4" value="'.$value.'" name="gaji" style="width:70px!important">'; }
Posted 03 August 2013 - 05:01 AM
Concentrate!
This is for setting the width of the input box!
This is not for getting the field size e.g.
`fullname` varchar(250) NOT NULL
[member=eljusticeiro] is asking how to get the 250 as above in order to make the input box that big e.g. maxlength=250!
Posted 04 August 2013 - 14:25 PM
uh.. why i always wrong :mellow:
Posted 06 August 2013 - 13:28 PM
is not the maximum size is the size of text presentation
Posted 06 August 2013 - 19:18 PM
file: flexgrid.css
.flexigrid div.form-div input[type=text], .flexigrid div.form-div input[type=password]
{
font-size: 15px;
width: 500px;
height:20px;
border: 1px solid #AAA;
padding: 5px 5px 5px 5px;
background: #fafafa;
}
.flexigrid div.form-div input[type=text], .flexigrid div.form-div input[type=password]
{
font-size: 15px;
height:20px;
border: 1px solid #AAA;
padding: 5px 5px 5px 5px;
background: #fafafa;
}
file: Grocery_CRUD.php (library)
$extra_attributes .= "maxlength='{$field_info->db_max_length}'";
add
$extra_attributes .= " size='{$field_info->db_max_length}'";