⚠ 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

Carrying field from page into table



wonder
  • profile picture
  • Member

Posted 31 January 2013 - 09:57 AM

Hi there,

I have two tables - one contains 'project' names and one contains 'contacts'.
I want users to ONLY have access to the contacts table but each set of project users should only be able to fill out details related to their particular project.

I have used add_action to create a link from the project table to create a page name like this;
http://www.mysite.co...roject_code=100

QUESTION;
How do I take the 'project_code=100' from the link above and insert it into the contacts table as a fixed invisible field for each contact row?

Any tips would be great!

Many thanks,

Piers

davidoster
  • profile picture
  • Member

Posted 31 January 2013 - 10:44 AM

You can get the project_code=100 by using the functions of the URI class of CodeIgniter, see here: http://ellislab.com/codeigniter/user-guide/libraries/uri.html

Check here for hidden/invisible fields, /topic/52-create-password-hidden-fields-in-the-form/

wonder
  • profile picture
  • Member

Posted 31 January 2013 - 17:46 PM

Thank you - exactly what I wanted and all working now.

Piers