Autoform Fields

From Aikiframework wiki

Jump to: navigation, search

For example, you have a Database table to store news. You want to create a form for this table in which the user name and the user_id of the logged in user get applied automatically.

Steps to do this:

  • add the DB with phpmyadmin or other mysql client
  • go to the aiki admin interface
  • click on Databases & Forms
  • click on your created Database Table
  • aiki adds a new form
  • open the form by clicking on the form name
  • search for the field where you want to add the users id
  • change the field type to "autofield"
  • add the options: user|SystemGOD:upload user:insertedby_userid
  • save the form

THATS IT.

If you want to add the logged in users name, add this options:

user|SystemGOD:upload user:value:insertedby_username

See Related Pages

Personal tools