KK wrote:Today i use relation many-to-one but this is no good soultion because the user see all the users and must select his user and so the ad gets saved as a relation to that user.
You don't have to give a choice (i.e. show the dropdown) to the user as it is predetermined that the ad would be related to the logged-in user.
You can explicitly set that value directly within the <cms:db_persist_form> tag as follows -<cms:db_persist_form
_invalidate_cache='0'
_auto_title='1'
ad_owner = k_user_id
/>
The code above assumes that the many-to-one region is named 'ad_owner' and k_user_id contains the ID of the logged-in user. Change them to suit your specific case.
Thanks KK again for helping. Works like a charm
