Welcome Guest, Not a member yet? Register   Sign In
v 1.3.3 grocery CRUD - an automatic Codeigniter CRUD

[eluser]C1t1zen[/eluser]
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
Code:
<?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":"<p>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

[eluser]web-johnny[/eluser]
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):
Code:
$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

[eluser]C1t1zen[/eluser]
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;

Code:
&lt;?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;

[eluser]web-johnny[/eluser]
I think I found where the problem can be, try this one:
Code:
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);
    }

[eluser]C1t1zen[/eluser]
thank you,
i did changed like you said

Code:
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

[eluser]web-johnny[/eluser]
You forgot to send me the URL in the private message. Please try to email me. Thanks.

[eluser]C1t1zen[/eluser]
thank you again
i did send you URL

i hope you can determine the problem

thank you in advance

[eluser]Unknown[/eluser]
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
Code:
$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}| ');

[eluser]web-johnny[/eluser]
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.

[eluser]Red[/eluser]
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




Theme © iAndrew 2016 - Forum software by © MyBB