Gossamer Forum
Home : Products : Gossamer List : Discussion :

how to have a editable field which column has been defined as primary key

Quote Reply
how to have a editable field which column has been defined as primary key
  

i have use below code to setup a table.

#use lib '/path/to/admin'; ##
use lib 'D:\webtest\admin';
use Links qw/$DB/;
my $c = $DB->creator('list');
$c->cols([
date => { type => 'datetime'},
username => { type => 'varchar', size => 18 },
status => { type => 'varchar', size => 30 },
tel => { type => 'varchar', size => 38 },
]);
$c->pk('username'); # Set primary key
$c->index({
tel_ndx => ['tel'],
}); # Setup indexes for faster searches
$c->create or die "Create failed: $GT::SQL::error";

then Then edit the db_nav.html template so that new table shows up in the editor (in order to manage things and add/remove item).

The problem is when i try to update or modify username field in admin panel, it did not return me a editbale text field. actually it is non editable in the admin panel.
i have saw the similar table called glink_users table, i wonder if i could create a similar table so i could edit the username with primary key flaged.


thank in advance