I have a column in my table called COMPLETE which is an int. ZERO is equal to no and one is equal to yes. I’d like the value in the CRUD to appear as yes or no, rather than zero or one. How do i do this? Is there some way to use setField to allow the value (in the crud) to appear as YES or NO wo having to change the schema to text?
post by richb201 on Jan 16, 2023
post by cybernicois on Jan 18, 2023
Use callBack…
post by expi on Jan 18, 2023
I have this:
$crud->fieldType('complete', 'dropdown', [
'0' => 'no',
'1' => 'yes'
]);
altough for some reason in the latest update it does not display ‘no’ in the column view anymore.
post by mariel_alberto on Jan 18, 2023
Hello
Use field_type true_false
Field_type
post by richb201 on Jan 26, 2023
Thanks. I don’t see true_false as a choice under fieldType. fieldType | Grocery CRUD - A PHP CRUD Generator Library
New & Unread Topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| How can I trim search fields in datagrid before the search starts? |
|
2 | 490 | May 9 |
| At least in v1.x: primary key not encoded in read / action URLs |
|
0 | 450 | May 3 |
| Grocery crud 1.6+ stable export filtered data |
|
0 | 317 | Aug 3 |
| Use callbackColumn() but keep inline edit functionality |
|
3 | 644 | Apr 12 |
| Inline edit has problems if the column width is set |
|
2 | 837 | Feb 28 |