Tell us what you are trying to do?
Hi, I need some help creating a form.
I have 3 custom post types: Taskforces (slug=taskforce), Profiles (slug=profile) and Documents (slug=document)
I have 2 relationship:
taskforce-document (One Taskforce to Many Documents)
taskforce-profile (many to many)
Basically, a WordPress user is a Profile Author and a Document Author.
So, I want to create a form to insert a new document and to do this i need to populate the relationship field taskforce-document only with options available for the profile of the same author.
I tried this:
<div class="form-group">
<label>[cred_i18n name='@taskforce-document.parent-label']Taskforces Documents[/cred_i18n]</label>
[cred_field field='@taskforce-profile.parent' class='form-control' output='bootstrap' select_text='--- not set ---' required='false' author='$current']
</div>
...but it doesn't work.
Maybe I have to create a View (all the Taskforces related to the Profile) to populate the relationship field?
Using the author='$current' attribute should only give the posts by the current author. If this is not working then there might be a conflict of some sort.
Can you temporarily disable all the non-toolset plugins and check again to see if the same issue remains ?
If it does then can you provide me with admin access to the so that I can have a look.
Hi Shane,
I don't think it's a concflict problem.
Basically I think it's a problem of Parent/Child relationship but I don't know how to use it.
CONDITION: I am the owner of a PROFILE. PROFILES are connected with TASKFORCES with a relationship field. It's mandatory because a user can only interact with specified Taskforces.
Every USER can also ADD a a custom Post Type Called DOCUMENT. Every DOCUMENT has a MTM relationship with Taskforces.
In the Post form to add a new DOCUMENT, I would like the user to be able to choose only from Taskforces selected by the admin in custom post Type PROFILE (with a relationship field TASKFORCE/PROFILE.
My target is to use in the POST FORM to add a DOCUMENT, the relationship field TASKFORCE/DOCUMENT but FILTERED by the relationship TASKFORCE /PROFILES.
If will be necessary I have to install another test site for privacy reasons and I'll create a a new admin user for you.
Excuse Me Shane,
In the last ticket there was an error. The relationships are:
taskforce-document (One Taskforce to Many Documents)
taskforce-profile (many to many)
I must apologize for the delay in response as on the weekends the forums are generally closed.
I''m happy to see that you were able to resolve the issue. If you're able to would you mind sharing the solution so that this thread can be used to benefit other users who may be having the same issue ?
Once you've done this you can go ahead and mark this ticket as resolved.