I couldn't find anything on this on the forums or google, I'm creating pages on a cloned template, the template has a relation to the extended user template of many to one:
Now creating a new cloned page works fine using databound forms but I cannot populate the relation automatically.. The logged-in user creating the page should be assigned to the relation.
I tried just submitting a global variable and when that didn't work I tried the below input:
along with:
but ticket_user is never filled, perhaps this is not possible within db_persist_form? I've never tried to automatically assign a relation like this before. Any thoughts?
- Code: Select all
<cms:editable type='relation' name='ticket_user' masterpage='users/index.php' has='one' label='Ticket Relation' desc='Which user does ticket belong to?' />
Now creating a new cloned page works fine using databound forms but I cannot populate the relation automatically.. The logged-in user creating the page should be assigned to the relation.
I tried just submitting a global variable and when that didn't work I tried the below input:
- Code: Select all
<cms:input type="hidden" value="<cms:show k_user_title />" name="username" />
along with:
- Code: Select all
<cms:db_persist_form
_invalidate_cache='0'
_auto_title='1'
status='Open'
ticket_user=frm_username
/>
but ticket_user is never filled, perhaps this is not possible within db_persist_form? I've never tried to automatically assign a relation like this before. Any thoughts?