EllisLab text mark
Advanced Search
22 of 23
22
   
v 1.3.3 grocery CRUD - an automatic Codeigniter CRUD
Posted: 12 September 2012 05:13 PM   [ Ignore ]   [ # 321 ]   [ Rating: 0 ]
Avatar
Joined: 2010-12-18
244 posts

Hello @C1t1zen.

If you have any problem to use dates you can easily use the change_field_type method. So in your case you can simply have:

$crud->change_field_type('inserted_date''date'); 

If you have any JavaScript problem you have to give a print-screen of your problem.

 Signature 

- grocery CRUD - a codeigniter CRUD library - user guide and download
- Web and Development - personal Blog

 
Posted: 12 September 2012 06:50 PM   [ Ignore ]   [ # 322 ]   [ Rating: 0 ]
Joined: 2012-04-29
7 posts

Hey Johnny!
i did waste about 2 days with crud
but now i’m still stuck with it

i did used this line code

$crud->change_field_type(‘inserted_date’, ‘date’);

look to my code in code in controller

<?php

if (!defined('BASEPATH'))
    exit(
'No direct script access allowed');

class 
Examples extends CI_Controller {

    
function __construct() {
        parent
::__construct();

        
$this->load->database();
        
$this->load->helper('url');

        
$this->load->library('grocery_CRUD');
    
}

    
function _example_output($output null{
        $this
->load->view('example.php'$output);
    
}
    
function index() {
        $this
->_example_output((object) array('output' => '''js_files' => array(), 'css_files' => array()));
    
}


    
function payments() {

        
/* This is only for the autocompletion */
        
$crud = new grocery_CRUD();
   
        
$crud->set_table('payments');
        
$crud->set_subject('مجموعات الرجيم ::  :: ');
        
$crud->required_fields(' title');
        
$crud->columns(' title''desc''group_slug');
        
$crud->change_field_type('birthdate''date');
        
$output $crud->render();
       
$this->_example_output($output);
    
}

so i dont know why calander is not loading

Also when i update i get this message:


{“success”:true,“insert_primary_key”:true,“success_message”:“Your data has been successfully updated. <a href=‘http:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/www.domain.com\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/examples\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/diet’>Go back to list<\/a><\/p>”,“success_list_url”:“http:\/\/www.domain.com\/examples\/diet\/success\/1”}

this message only appears when i use date field in mysql table
if i removed this date field it does not appears and everything go fine.

thank you in advance

 
Posted: 14 September 2012 02:36 AM   [ Ignore ]   [ # 323 ]   [ Rating: 0 ]
Avatar
Joined: 2010-12-18
244 posts

Ok I think I know where the problem should be. Can you please tell me:
- PHP Version
- Codeigniter Version
- grocery CRUD version
- default language

Probably there is something with the default language, perhaps a bug. Can you please check if you change it to english (application/config/grocery_crud.php):

$config['grocery_crud_default_language''english'

This now works for you?  If yes then just let me know and I will check it further.

Cheers
Johnny

 Signature 

- grocery CRUD - a codeigniter CRUD library - user guide and download
- Web and Development - personal Blog

 
Posted: 14 September 2012 08:00 AM   [ Ignore ]   [ # 324 ]   [ Rating: 0 ]
Joined: 2012-04-29
7 posts

Hey
thank you for reply
PHP Version 5.2.17
- Codeigniter Version :2.1.2
- grocery CRUD version : last version

application/config/grocery_crud.php settings;

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 
//For view all the languages go to the folder assets/grocery_crud/languages/
 
$config['grocery_crud_default_language''english';

 
// There are only three choices: "uk-date" (dd/mm/yyyy), "us-date" (mm/dd/yyyy) or "sql-date" (yyyy-mm-dd) 
 
$config['grocery_crud_date_format']   'sql-date';

 
// The default per page when a user firstly see a list page
 
$config['grocery_crud_default_per_page'25//Can only take values 10,25,50,100
 
 
$config['grocery_crud_file_upload_allow_file_types']   'gif|jpeg|jpg|png|tiff|doc|docx|txt|odt|xls|xlsx|pdf|ppt|pptx|pps|ppsx|mp3|m4a|ogg|wav|mp4|m4v|mov|wmv|flv|avi|mpg|ogv|3gp|3g2';
 
$config['grocery_crud_file_upload_max_file_size']    '20MB'//ex. '10MB' (Mega Bytes), '1067KB' (Kilo Bytes), '5000B' (Bytes)
 
 //You can choose 'ckeditor','tinymce' or 'markitup'
 
$config['grocery_crud_default_text_editor''ckeditor';
 
//You can choose 'minimal' or 'full'
 
$config['grocery_crud_text_editor_type']  'full'
 
 
//The character limiter at the list page, zero(0) value if you don't want character limiter at your list page
 
$config['grocery_crud_character_limiter']  30

 

 
Posted: 15 September 2012 04:02 AM   [ Ignore ]   [ # 325 ]   [ Rating: 0 ]
Avatar
Joined: 2010-12-18
244 posts

I think I found where the problem can be, try this one:

function payments() {

        
/* This is only for the autocompletion */
        
$crud = new grocery_CRUD();
   
        
$crud->set_table('payments');
        
$crud->set_subject('مجموعات الرجيم ::  :: ');
        
$crud->required_fields('title'); // instead you had ' title' with whitespace
        
$crud->columns('title''desc''group_slug'); // instead you had ' title' with whitespace
        
$output $crud->render();
       
$this->_example_output($output);
    
 Signature 

- grocery CRUD - a codeigniter CRUD library - user guide and download
- Web and Development - personal Blog

 
Posted: 15 September 2012 08:50 AM   [ Ignore ]   [ # 326 ]   [ Rating: 0 ]
Joined: 2012-04-29
7 posts

thank you,
i did changed like you said

function payments() {

        
/* This is only for the autocompletion */
        
$crud = new grocery_CRUD();
        
//$crud->set_theme('datatables');
        
$crud->set_table('payments');
        
$crud->set_subject('payment new');
        
$crud->required_fields('title');
        
$crud->columns('title''desc''group_slug');
        
$crud->change_field_type('birthdate''date');
        
$output $crud->render();
       
$this->_example_output($output);
    

i will send you in private my url maybe there is js files not loaded

 
Posted: 15 September 2012 08:57 AM   [ Ignore ]   [ # 327 ]   [ Rating: 0 ]
Avatar
Joined: 2010-12-18
244 posts

You forgot to send me the URL in the private message. Please try to email me. Thanks.

 Signature 

- grocery CRUD - a codeigniter CRUD library - user guide and download
- Web and Development - personal Blog

 
Posted: 15 September 2012 09:21 AM   [ Ignore ]   [ # 328 ]   [ Rating: 0 ]
Joined: 2012-04-29
7 posts

thank you again
i did send you URL

i hope you can determine the problem

thank you in advance

 
Posted: 11 October 2012 03:56 AM   [ Ignore ]   [ # 329 ]   [ Rating: 0 ]
Joined: 2012-10-11
1 posts

Good day, how to connect 2 table are in a relationship 1-n, where the main table no pointer to the secondary

‘Application’,‘Colors’,‘Image’ - not in base

$crud->add_fields('prod_set_name''vendor_id','arcticle''id_type''add_data','Application','Colors','Image');   


$crud->set_relation('Image','images','{url} alt text |{alt}| ');
//$crud->set_relation_n_n('Image', 'prod_set_images', 'images', 'prod_set_id', 'images_id', '{url} alt text |{alt}| '); 
 
Posted: 13 November 2012 04:08 AM   [ Ignore ]   [ # 330 ]   [ Rating: 0 ]
Avatar
Joined: 2010-12-18
244 posts

The new version of grocery CRUD 1.3.3 is now released.

In this version we had resolved lot of bugs and we added many small new features. The important thing about this version is that with the help of Sergey Noskov we renewed almost all the JavaScript plugins and we reduce the total size to ... half size than before. For more you can check the change logs of this release.

 Signature 

- grocery CRUD - a codeigniter CRUD library - user guide and download
- Web and Development - personal Blog

 
Posted: 19 November 2012 09:09 AM   [ Ignore ]   [ # 331 ]   [ Rating: 0 ]
Joined: 2012-10-05
8 posts

Hello sir im new totally new to CI and i use your CRUD works perfect and smooth to my project, i just want to ask for help because i have 33 fields on my table, like id, fname, lname, middle,, address1, address2, campus, college, etc..etc… my question is how can i select only and display id, fname, Lname, middle on my grocery crud table.. thank you so much

 
Posted: 19 November 2012 09:19 AM   [ Ignore ]   [ # 332 ]   [ Rating: 0 ]
Joined: 2012-10-05
8 posts

sir i alredy solved i read your documentation again.. thnx   by using this..
    $crud->columns(‘Fname’,‘Lname’);

but my question again sir how can i change my field name on crud table example Fname i want is First Name, and Lname i want Last Name.

 
Posted: 19 November 2012 02:52 PM   [ Ignore ]   [ # 333 ]   [ Rating: 0 ]
Avatar
Joined: 2012-09-06
49 posts

Hi all! I created library which simplifies creation of the dependent dropdown.
If you have some dependent dropdowns this library for you.
When you made selection in a “Parent” dropdown it library allow to refresh a “child” dropdown.
More info here : http://www.grocerycrud.com/forums/topic/1087-dependent-dropdown-library/

 
Posted: 19 November 2012 02:56 PM   [ Ignore ]   [ # 334 ]   [ Rating: 0 ]
Avatar
Joined: 2012-09-06
49 posts

but my question again sir how can i change my field name on crud table example Fname i want is First Name, and Lname i want Last Name.

you can use the “display_as”. more info here: http://www.grocerycrud.com/documentation/options_functions/display_as

 
Posted: 19 November 2012 09:04 PM   [ Ignore ]   [ # 335 ]   [ Rating: 0 ]
Avatar
Joined: 2010-12-18
244 posts

I think a good start for you would be these tutorials grin

1. Tutorial basic methods

2. Tutorial basic methods 2nd part

3. Tutorial using callbacks

 Signature 

- grocery CRUD - a codeigniter CRUD library - user guide and download
- Web and Development - personal Blog

 
22 of 23
22