[TYPO3-dev] Fields in the TCA that does not exist in the DB

Jeff Segars jsegars at alumni.rice.edu
Thu Oct 25 17:59:33 CEST 2007


>>   At the bottom of ext_tables you will see definition of a virtual
>> field:  tx_wecmap_geocode
>>   The rendering is done in class.tx_wecmap_backend.php and delivers
>> a form  part.
>>   
>>   The main point why this will work is (if i'm right) that this
>> virtual field  doesn't exists in POST-vars. These are taken from
>> core to validate against  DB.

>  The reason why it works in Jeff's case is that the field is of type
> 'passthrough' and that it only displays some information in the
> BE-form (it does not add a "real" field). This doesn't fit in my
> case. The category field is a "real" field in the BE-form (not in the
> database) and the data from it exists in the "$incomingFieldArray"
> variable in tcemain. I need it this way in order to trigger tcemain
> to write the MM-relation records.

I just did some testing on this and seem to have confirmed Steffen's
explanation above.  The first requirement is that the field is of
type=user or form_type=user.  In the case of wec_map, we define the
form_type as user and the type as passthrough so that the map doesn't
accidentally show up in list view.  I checked with only the type=user
(and passthrough nowhere) and it does still work.

I then updated the names of my form fields inside the type=user form
so that one of the form fields was the name of what form field would
normally be (ie. data[fe_users][7][tx_wecmap_geocode]).  When I did
this, I got an error message about the field not existing.

>From what I can tell, there are a couple key parts to making this
work.  The field needs to be of type=user and any form element names
should not correspond to actual TCA element names.

For what its worth, I do think a core patch of some sort is probably
the right long term solution.  This is just a way to get around the
problem, but is probably more complex than it has to be.

>  apart from that the extension looks really cool, Jeff (if you're
> reading this). Hope I will get a case where I can make use of it. WEC
> rocks TYPO3 :-)

Thanks :)

jeff






More information about the TYPO3-dev mailing list