Gossamer Forum
Home : Products : Gossamer Links : Discussions :

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 new table.

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

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 editor panel, it did not return me a editbale text field. actually it is non editable in the admin editor 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
Subject Author Views Date
Thread how to have a editable field which column has been defined as primary key courierb 3716 Oct 5, 2008, 3:44 PM
Thread Re: [courierb] how to have a editable field which column has been defined as primary key
courierb 3630 Oct 7, 2008, 5:34 AM
Thread Re: [courierb] how to have a editable field which column has been defined as primary key
Andy 3631 Oct 7, 2008, 7:51 AM
Thread Re: [Andy] how to have a editable field which column has been defined as primary key
courierb 3606 Oct 7, 2008, 9:32 PM
Post Re: [courierb] how to have a editable field which column has been defined as primary key
courierb 3578 Oct 11, 2008, 9:34 PM