[Maypole] AsForm again - selects?

From: Dave Howorth (dhoworth at mrc-lmb.cam.ac.uk)
Date: Thu Dec 09 2004 - 16:47:38 GMT


I'm looking at the addnew form for a table that has a foreign key that
is allowed to be null. AsForm has generated a select box for it, which
is good (modulo the other issues we know about :) But it's populated
the select box with all the existing keys. There doesn't seem to be any
way to say that I want a NULL value for this field in my new record.

I have SQL like this:

CREATE TABLE a_table (
   id INT NOT NULL,
   fk INT,
   FOREIGN KEY (fk) REFERENCES another_table (id)
) TYPE=InnoDB;

and code like this:

ATable->has_a( fk => 'AnotherTable' );
AnotherTable->might_have(entries => 'ATable', 'fk');

Is there something else I should be configuring or do I need to think
about overriding AsForm?

maypole.perl.org seems to be down, so I couldn't check if
<http://maypole.perl.org/?ImprovedAsForm> has anything new.

BTW, I'm frequently having trouble getting to perldoc.com over the past
few weeks. Is this a shared problem? Are there mirrors?

Thanks, Dave

_______________________________________________
maypole mailing list
maypole at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole



This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:57 GMT