Jump to content


Boolean field & Image upload field & Default date

boolean image upload field date default value

  • Please log in to reply
1 reply to this topic

#1 Гэрэлт-Од Гоцбаяр

Гэрэлт-Од Гоцбаяр

    Member

  • Members
  • PipPip
  • 18 posts

Posted 27 February 2013 - 02:31 PM

1. How I configure field as boolean?

2. How I configure field as image file upload?

3. Is there any example about image upload field with Image cropping?

4. How can I set default date for datetime type field? (current date)

 

My current code isn't working.

 

public function we() {

        $this->grocery_crud->set_table('we');
        $this->grocery_crud->display_as('title','Гарчиг')->display_as('body', 'Контент')->display_as('titlelong', 'Урт гарчиг');
        $this->grocery_crud->required_fields('title','body');
        $this->grocery_crud->set_field_upload('image','assets/uploads/images');
        $this->grocery_crud->change_field_type('featured', 'true_false');
        $output = $this->grocery_crud->render();

        $this->_example_output($output);
    }

 

 



#2 Гэрэлт-Од Гоцбаяр

Гэрэлт-Од Гоцбаяр

    Member

  • Members
  • PipPip
  • 18 posts

Posted 27 February 2013 - 02:36 PM

Forget question number 1. I found answer from here: http://www.grocerycr...ange_field_type

 

Update: forget question number 2.







Also tagged with one or more of these keywords: boolean, image, upload, field, date, default, value

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users