Autocompletion of field while creating entry from subpannels

hi !

i created a custom module called “Affaires”.

In this module’s editview, i have 3 fields (amongst others) that are “contact”," account" and “assigned user” . When i want to create a new entry in that module from the related subpannel in contacts or accounts , the 3 fields are blank by default and i would like to set the values automatically.

For example if i create the entry from the contact module, the 3 fields should be filled and if i create it from accounts, the contact should be blank

Fixing this would be a nice quality of life improvement for my users

thanks for your help


You will need to inject some Javascript to the view (search Google for examples) and work out these automations from there…