Forum for discussing general topics related to Couch.
2 posts Page 1 of 1

quick question regarding databound-forms and setting relations if they are set to reverse_has=''one".

Setup is:
- there is a template A ( with set relation as follows)
Code: Select all
<cms:editable type='relation' name='blogpost_owner' masterpage='blog-single.php' reverse_has='one'/>

and this template is set as index file for users ( extented-users ) - therefore each user has exactly one page.

Then there is second related clonable template ( blog-single.php ) to which new content should be added via databound form. In process I'd like to set that relation based on the user ID submitting the form ( or anyhow :D )

I have no trouble setting it via databound form linked to template A via:
Code: Select all
<cms:input name='blogpost_owner' type='bound' /><br />

but i cannot figure out way how to set-it from the other way ( from databound form linked to blog-single.php ) as logically there is no defined relation within that template. ( error: no definied region etc. etc.. )

Is there any way?

Perhaps the solution is simple - place the editable to the blog template, not the users template. Is there any objection to this?
Use reverse relation to quickly see blog posts of each user - viewtopic.php?f=8&t=8559#p16293
2 posts Page 1 of 1

Who is online

In total there are 5 users online :: 0 registered, 0 hidden and 5 guests
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 5 guests