Hi,
I've been searching for a solution for my problem all over the drupal website an have gone trough numerous lines of code but i can't seem to get how you create a edit form with default values loaded.
I have a page listing all my items stored in the database, i have operands for each item, Edit and Delete.
I've also added the menu item for the edit operand:
// Edit server link
$items['admin/config/deltalan/gameserver/edit/%'] = array(
'title' => 'Edit server',
'description' => 'Lets you edit a gameserver',
'page callback' => 'gameserver_edit_form',
'page arguments' => array('edit', 5),
'access arguments' => array('administer game servers'),
);
As you can see the page callback is set to gameserver_edit_form, i have a form made here that is a copy of the add form but with default value set also on each form item.
The problem i'm having is how do i get the value from the wildcard % and use it so that i can fetch the specific row from the database and use it as default_value in my edit form?