Hello,
I am trying to initialize an attribute of the link table between an n-n relationship and according to the documentation this would be possible using the PrefillCreationForm method.
I have two tables created and related by a linked attribute but while adding objects on the Indirect LinkedSet attribute, the PrefillCreationForm method is never called.
Looking at dbobject.class.php I have seen that there is the case creation_from_editinplace which I think is the one I need but it is never called too.This is a bug or is not possible to prefill data from a linkedAttribute?
Hello,
Can you describe the use case you wanted to solve ?
And send your customization's XML ?
Hello,
Can you describe the use case you wanted to solve ?
And send your customization's XML ?
Hello,
This is the description of the use case I want to solve
And this is the XML
Hello Samuel,
The PrefillCreationForm method is not called in the case of an n:n relation (and the wiki does not say it would)
The only option to have it prefilled is for the attribute of the link table, to have a default value.
Another possibility, is to stop using n:n relationship to replace them with a standard class (no more a link) and the associated AttributeLinkedSetIndirect to be replaced by AttributeLinkedSet, in which case adding a link, would mean create an object, using the CreationForm and then the PrefillCreationForm method would be called... but the remote object would not be known as not yet selected.
Best regards
Vincent
Closing this ticket after Vincent's answer