⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Get field value for new action



Zoli Hali
  • profile picture
  • Member

Posted 18 August 2013 - 12:49 PM

Hi averyone!

 

I would like to create a new action wich just ads 3 values in a table so i can use it later to list something.

 

I need to add a field from the table i'm cruding but i'm not showing that column to the users:

 

$crud->set_table('jobs')
            ->set_theme('twitter-bootstrap')
            ->set_subject('Job')
            ->columns('jobs_desc','jobs_titel','jobs_date')
            ->add_action('Subscribe', '', 'auth/subscribe/' . $individual_id . '/' . $CompanyID . '' ,'icon');/*grocery crud automaticley puts the list item id to the and of url*/
       

 

 

How can I add the company id field of the row to '$CompanyID' ?


davidoster
  • profile picture
  • Member

Posted 18 August 2013 - 16:31 PM

Hello and welcome to the forums [member=zoli hali].

Well for this you will need to access the database again and get the required CompanyID that will be used within your controller.

A simple (and preferable) option is to use a custom model for this.


Kinon
  • profile picture
  • Member

Posted 14 January 2015 - 23:56 PM

what about

 

$myvalue = $crud->get_edit_field_value('field');

 

whould be nice. :D