the title must die... / Jonah Crawford <jonah@newuses4.info>
| the title must die...
Jonah Crawford <jonah(at)newuses4.info> |
2005-10-17 13:46:05 | [ FULL ] |
I didn't ask for it - but nevertheless got it. I would prefer if the title were grabbed from the data upon input assuming either the concatenated name or company name. Any way to assign it to the input of another field and keep it hidden ? Jonah Jonah Crawford co-founder NewUses4.info jonah(at)newuses4.info 202.487.9109 |
Re: [ZPUGDC] the title must die... / joel@joelburton.com
| Re: [ZPUGDC] the title must die...
joel(at)joelburton.com |
2005-10-18 06:47:30 | [ FULL ] |
On Mon, Oct 17, 2005 at 02:50:21PM -0400, Jonah Crawford wrote:[...]
Look at the ComputedField; you probably want something like:
schema = ComputedField('title',
expression='context.getCompanyTitle()',
accessor='Title',
...
)
def getCompanyTitle(self):
# put whatever you want here to find the "right" title
return self.getFname() + " " + self.getLname()
Note the use of "accessor='Title'"--subtle but important;
if you don't have this, then Archetypes will use 'getTitle'
for the accessor, and the metadata API, for historical reasons,
requires Title.
- j.
|
