Jump to content


Crud Required_fields

Crud

  • Please log in to reply
7 replies to this topic

#1 Sofia Zahid

Sofia Zahid

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 15 May 2013 - 10:23 AM

 please can some one help me this  function $crud->required_fields('city'); didn't work  in the exemple "Callback_add_field example .

 

 

 


 



#2 davidoster

davidoster

    Grocery CRUD Ninja

  • Advanced Member
  • PipPipPip
  • 1,068 posts
  • LocationAthens, Greece

Posted 15 May 2013 - 11:27 AM

Hello and welcome to the forums.

Can you please paste your code here?


____________________________________________________________

 

rtfm_small.jpg---!!!Please read these guidelines before asking to the forums!!!---

____________________________________________________________

 

David Oster aka George Pasparakis,
http://odphotography.com
http://eletter.gr


#3 Sofia Zahid

Sofia Zahid

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 15 May 2013 - 11:41 AM

thank's Mr;

 

the Code:

 

function offices_management()
{
try{
$crud = new grocery_CRUD();
 
$crud->set_theme('datatables');
$crud->set_table('offices');
$crud->set_subject('Office');
$crud->required_fields('city');
$crud->columns('city','country','phone','addressLine1','postalCode');
$output = $crud->render();
$this->_example_output($output);
}catch(Exception $e){
show_error($e->getMessage().' --- '.$e->getTraceAsString());
}
}

 



#4 davidoster

davidoster

    Grocery CRUD Ninja

  • Advanced Member
  • PipPipPip
  • 1,068 posts
  • LocationAthens, Greece

Posted 15 May 2013 - 12:26 PM

Which version of Grocery CRUD are you using?

Make sure you have the latest stable one from here.


____________________________________________________________

 

rtfm_small.jpg---!!!Please read these guidelines before asking to the forums!!!---

____________________________________________________________

 

David Oster aka George Pasparakis,
http://odphotography.com
http://eletter.gr


#5 Sofia Zahid

Sofia Zahid

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 15 May 2013 - 01:03 PM

I'm using Grocery CRUD v.1.3.3 (latest version)



#6 davidoster

davidoster

    Grocery CRUD Ninja

  • Advanced Member
  • PipPipPip
  • 1,068 posts
  • LocationAthens, Greece

Posted 15 May 2013 - 08:58 PM

This is strange! Does it save and edit correctly at the database?


____________________________________________________________

 

rtfm_small.jpg---!!!Please read these guidelines before asking to the forums!!!---

____________________________________________________________

 

David Oster aka George Pasparakis,
http://odphotography.com
http://eletter.gr


#7 heruprambadi

heruprambadi

    Advanced Member

  • Members
  • PipPipPip
  • 83 posts
  • LocationIndonesia

Posted 16 May 2013 - 08:08 AM

are you using xampp ? what version ?



#8 mnish

mnish

    Member

  • Members
  • PipPip
  • 23 posts
  • LocationIndia

Posted 31 August 2013 - 05:02 PM

I think you have to use

 

$crud->fields('field1', 'city');

 

then

 

$crud->required_fields('city');

 

i am using it and it works fine.







Also tagged with one or more of these keywords: Crud

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users