Imagine that particular fields of an IRRE child record shall only be shown depending on a value in the parent record. Currently there is no easy way to access evaluate the parent record and define a behaviour.
For Flexforms a similiar solution with displayCond is available, e.g.:
However, it's problematic if the parent record is brand new and was not saved yet. In that case the field values of the parent should be transfered to the server side with the accordant AJAX request.
(issue imported from #M17824)
#8 Updated by David Frerich over 7 years ago
I've written a small patch for TYPO3 6.1.1 to implement this feature.
- Currently only "group"-Fields work
- It's only working if the records have been saved into the database (see the initinal comment)
- When more than one value exists (comma seperated uids in database), the first is taken
Fieldname could be anything, any field name you want, that's a TCA Column of type="group"
- Field with multiple values / MM relations -> ignore? take the first value? compare all?
I think it would suffice to pick the first value / record for comma-seperated fields and ignore MM-Relations
- Has to work for "select" and "inline" if no MM-Table is definied
- Brand new records should provide data for the ConditionMatcher
#12 Updated by Christian Kuhn almost 5 years ago
- Status changed from Accepted to Rejected
this will not make it to 7. one of the main issue is indeed that - if parent is not persisted yet - the record data is not available at all during inline ajax request. actually, at the moment, parent is never available since parent is not fetched in inline new/open ajax context at all. there are more issues with parent overriding child data or tca depending on parents state, and none of that is solved.
solving this in a sane way will require way more thoughts if this is ever possible or wanted. an additional issue i see here is that a feature like this would render the very complex inline setup even more complex. i'm seriously not sure if we really should allow such stuff at all.
this issue should be solved differently - there are for instance the foreign_types "overrides" available to show different fields depending on which parent field the child is assigned to: one field per relation then to configure different child behavior. fal uses this for instance.
be prepared that this issue will probably not be solved in the near future. and if so, it will probably come along with a bigger tca syntax change.
i'll close this issue as rejected for now.