I am passing url parameters to a form as follows hidden link. The request-title shows up fine but the two drop-down fields do not show. The form code is shown in the form-param1 image attached. The frontend view is shown in form-param2. As you can see the default is not appearing and does not appear in the post when submitted. Am I doing something wrong?
Regards
Graham
Hi, you need to use IDs in your URL params instead of post slugs or post names. The relationship form fields are set up to respond to IDs, so that's probably why the proper selections do not appear selected.
When you say IDs do you mean the ID number of the user? I am currently passing the WordPress username which is identical to what shows in the dropdown when I click on it.
I have tried ID numbers, WordPress username. Neither work. When I activate the dropdown I get a list of the usernames that I am trying to preset - see image3
When you say IDs do you mean the ID number of the user?
No, User IDs are irrelevant here because Users cannot be directly associated to posts by post relationship, and these two form fields establish post relationships. I am referring to the ID of the post that should be selected in the relationship field. In other words, the Request Owner and the Request Target Participant are custom posts in your site. You must pass the ID of the post that corresponds to the Request Owner or Request Target Participant which you want to be automatically selected. How that ID is associated to the User's ID or Username, I'm not sure offhand. It may be the case that your User is the author of those posts, or there may be some other association I don't fully understand.