Tell us what you are trying to do?
I would like to use post reference fields but the problem is that just one is filterable. So i use normal fields now.. But is it possible to use post reference fields in a post form and update a normal field (hidden) too with the same value at submit?
Thanks,
Menno
Hello, I think the best way to do this is to remove the post reference field from the Form, and set the post reference field value programmatically with the Forms API and the Toolset Post Relationships API. The cred_save_data API can be used to hook into the form submission event. Then in your callback, the toolset_connect_posts API should be used to connect two posts with a post reference field. The post relationship slug in this case is the same as the slug of the post reference field. If the value is deleted from the normal field, you may have to programmatically disconnect those posts using the toolset_disconnect_posts API.
https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data
https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/#toolset_connect_posts
https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/#toolset_disconnect_posts
Let me know if you have questions about those APIs and I can take a closer look.