Hi!
Can I change the default field width in edit/add form? For exemple in an integer or text field.
Thanks.


2 replies to this topic
#1
Posted 13 March 2012 - 12:02 PM
#2
Posted 13 March 2012 - 01:18 PM
Use this function
Here it is the list of available field type:
Use callback to change the width http://www.grocerycr..._insert_example
change_field_type
Here it is the list of available field type:
- integer
- true_false
- string
- text
- date
- datetime
- enum
- hidden
- invisible
- password
Use callback to change the width http://www.grocerycr..._insert_example
#3
Posted 14 March 2012 - 08:39 AM
Thanks Naufal.
It's working:
And I change the style in the callback, now it's the same with than the select boxes:
It's working:
$crud->change_field_type('aforament', 'integer'); $crud->callback_edit_field('aforament',array($this,'edit_aforament_callback'));
And I change the style in the callback, now it's the same with than the select boxes:
function edit_aforament_callback($value, $primary_key) { return '<input type="text" value="'.$value.'" name="aforament" class="numeric" maxlength="9" style="width:238px">'; }
Also tagged with one or more of these keywords: form
Support →
Grocery CRUD Enterprise →
Tutorial : How to Add javascript control in the modal formStarted by nunenthal, 22 Jul 2019 ![]() |
|
![]() |
||
Development →
Extra coding / Plugins →
Custom edit/add/read/etc formStarted by genya, 03 Jun 2019 ![]() |
|
![]() |
||
Support →
I have a question →
Trim function not workingStarted by RMaynard, 23 Nov 2017 ![]() |
|
![]() |
||
Support →
I have a question →
Public form / addStarted by jvels, 14 Jun 2017 ![]() |
|
![]() |
||
Support →
I have a question →
How to make a form with joins tablesStarted by Bengo, 15 Apr 2017 ![]() |
|
![]() |
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users