Working on a site where I am creating a “foodchain”. My goal is to relate the post to other authors basically. I was able to successfully use the user field inside of a repeater to get my concept working. However the relationship picker is a nicer solution.
Also just curious how would I go about customizing the user field or rather duplicating it so that I can change the selectable value from username to a custom field value I have added ie (company name). I haven’t even looked into it at all but if you can point me in the right direction that would be clutch.
I know I say it all the time, but your plugin is so cluuutch.
There is a guide in the docs that will show you how to create a new custom field and register it to your website.
You can easily copy and paste 99% of the user field code into your own field.
Without knowing how your user is attached to a ‘company’, I can’t offer any advice on your question other than use the connection to find the company and add that to the create_field $choices
Thanks for the tip @elliot. I was able to successfully clone the User field and change the value output for each choice with the company custom field added to each user. This will make it easier for the website users to develop the foodchain.
What are your thoughts on adding users to the “Relationship” field? I think it would be nicer then my drop down in a repeater solution. I tried to work it out on my end but the Relationship field was pretty heavy. Just a thought, I don’t need it but it would be neat to be able to use in the future.
I think a better solution will be to create a AJAX powered option for the user and post_object fields.
This will be included into the core in the near future.