Questions tagged [grocery-crud]

Grocery CRUD is an open-source CRUD implementation for the CodeIgniter PHP framework.

Grocery CRUD is an open-source CRUD implementation for the CodeIgniter PHP framework.

Website

http://www.grocerycrud.com/

Function Documentation

http://www.grocerycrud.com/documentation

Usage Examples

Other examples

356 questions
1
vote
1 answer

get custom field value using Grocery CRUD CodeIgniter

How can I get the value of a field from another table on my method? And of course, I have the primary key of its table. I want to do something in add/edit action like this: if (is_empty(value_field_from_another_table)) { …
Mayfield Four
  • 95
  • 3
  • 9
1
vote
1 answer

Codeigniter Grocery Crud update field?

$crud->set_rules('user_password', 'Password', 'trim|required|matches[konfirmpass]'); $crud->set_rules('konfirmpass', 'Konfirmasi Password',…
Idham Perdameian
  • 2,199
  • 24
  • 34
1
vote
0 answers

Database Syntax error Codeigniter Grocery Crud with SQLite

I have created one application with Codeigniter Grocery Crud with SQLite. It is working fine at localhost. But when I hosted online by CPanel, it shows syntax error following, A Database Error Occurred Error Number: HY000/1 near "SHOW": syntax…
Suresh s.p
  • 29
  • 1
1
vote
0 answers

How to use alias in where clause with join with other table in grocery crud?

We need to use the : $crud->where('session.active',"1"); in my condition, but when i add the above line it's give me error like : http://prntscr.com/nltp9i This is my code : $crud = new…
1
vote
1 answer

CodeIgniter / GroceryCrud : radio button / drop down dependent to unhide hidden field

before i ask some question i just want to appreciate this is the best CRUD generator for CI/PHP. I'm using this for all of my website. so my question is, i have some fields in my controller : $crud->display_as('id', 'No') ->display_as('name',…
1
vote
1 answer

How to restrict database modification when two users are working on the same record - groceryCRUD

I am writing an app using Codeigniter/groceryCRUD. How can I restrict two users to work on the same field at the same time ? EDIT I have tried when two users work simultaneously. The first user can not see modifications made by the second user, but…
mlwn
  • 1,156
  • 1
  • 10
  • 25
1
vote
1 answer

PHP Grocery Crud | Callback Before Insert multple fields

The idea is when I add a new row, one of the field (ID) have to has a default value + Value of another field + date. Example of ID: IDPeter17112017 So, this is the code I have but it doesn't work, or maybe isn't the best way to do…
Dann
  • 21
  • 4
1
vote
2 answers

PHP (Grocery CRUD) | Mysql Generate an unique and random number between two numbers

I have a table created in Mysql with this colums secretNumber (Primary key & AI) Name Date etc... My idea is when I'm going to add a new item to this table, automatically generate a "secret number" but must has 3 requirements: Unique…
Dann
  • 21
  • 4
1
vote
1 answer

why the list using codeigniter don't show all records?

public function ajax_disposisi() { $this->load->helper('tanggal'); $this->jadwal->column_search=array('nomor','tanggal'); $this->jadwal->column_order=array(null,'nomor','tanggal'); $list =…
1
vote
1 answer

How to change Grocery Crud text editor with bootstrap summernote

Hi everyone I got some problem with my text editor in Grocery Crud. In my default text editor I couldn't upload image into the editor so I think I want to change default text editor with bootstrap summernote. But the problem is how to I to do that ?…
Antonio
  • 755
  • 4
  • 14
  • 35
1
vote
1 answer

Query is not filtering duplicate rows

Query is not filtering the duplicate rows from two tables in grocery crud, i'm trying to show one list without duplicates and it seems query is being ignored by the controller. what am i doing wrong? Model public function delete_duplicaterow() { …
Jose
  • 310
  • 1
  • 12
1
vote
2 answers

Get element list with a specific id

For example, i have two tables ('intervalosHorarios' and 'entregas' [1_n]) and i want to show 'entregas' list from specific 'intervalosHorarios' id. I tried the following but it didn't work. Tables Controller List public function…
Jose
  • 310
  • 1
  • 12
1
vote
1 answer

set_field_upload in grocery crud not rendering

i am trying to use set_field_upload to upload a images in a database field called "photo", the crud is working perfectly for text/dates...etc But u can't use the file upload it's not showing as a file button, its only a text input. no errors in…
Tariq Albajjali
  • 327
  • 1
  • 6
  • 16
1
vote
1 answer

data check function does not work

I'm trying to check for a valid date in grocery crud (end date should be after start date) but the below code does not work it still saves the invalid date, can anyone help? $crud->set_rules('cardEnd','End…
1
vote
1 answer

grocery crud call back

I'm Having an issue understanding and using the Grocery crud callback funtion...the documentation isn't clear. I have 3 tables: 1. Team $crud->fields('TeamID','Name', 'HomeCountry'); 2. Player $crud->fields('PlayerID','Fname', 'Sname', Title',…