I have still a question : I want to display the relationship field inside a Cred (the one that allows to modify a product). Is it feasible and how (I just checked and the Toolset tool (when you are in the Post form admin page) do not propose to add another Cred?)
I want the user to be able to modify the relationship inside the product cred modification (not to send them to another page for doing that).
Here is what I have added inside the Cred product modification :
I have first tried :
[cred-relationship-form form='salle-dun-enseignement' parent_item='$current']
and then :
[cred-relationship-form form='salle-dun-enseignement' parent_item='[wpv-post-id]']
Each time, the product was well chosen (in a non editable field), but the localisation was empty (no way to add letters to find the right localisation).
If I place both lines :
[cred-relationship-form form='salle-dun-enseignement' parent_item='$current']
[cred-relationship-form form='salle-dun-enseignement' parent_item='[wpv-post-id]']
then the second relationship allows the choice of the localisation but I'm getting an error when submitting the form as the first field was not filled !!!
The other point is that I need to display the different relationships when editing the product and be able to modify and / or delete some of them.
Any guideline on this, knowing that I did not found
I'm working on a site where my client uses a specific front end admin (and not the standard WordPress admin).
So, I have created a Cred in order for my client to create a product in the front end. In this product, I have currently 2 custom taxonomies in addition to the product cat.
When filling the form, my client can make a choice on each of these categories. So in the product creation, what is needed is :
- Display the different fields and propose the list of options in each.
Then, in the same front end admin, I have also created a cred to modify the products. In this form, I have the same fields than for the creation, but I need to display the current value fro the chosen product. So the need here is :
- Display the current product value (here the taxonomies
- Allow to change the current choice.
For the custom taxonomies, the choice could be more than one for the same product.
Not sure to understand your question.
I'm currently searching the best (and easy) way to manage relationship in my site. I have started with taxonomies and discovered that there was no possibilities to manage terms fields with Cred !!!
Now, I'm trying to "escape" from this situation. I'm aware that I could use some hook in order to update terms fields in the front end thanks to a Cred modification and that's stay as a potential solution for me (as everything should be made from the front end - no admin access for my client).
The other solution is to move to your new relationship and for that, I need to be sure that I will ba able to have to right way of doing (see my previews post), otherwise, I will not put resources in moving that way.
Thank you for the clarity but going the route of the post relationship will be the best route to go.
Because if a location is already created all the user will need to do is connect that product to the location, however the only issue is that the relationship form cannot be on the same form that is being used to create the product.
This relationship form has to be separate. The documentation I sent previously provides a pretty good example of this where the user might be viewing a product and then they can click a button to connect a location to that product.
I think you're right and relationship should be the best way for the future. Nevertheless, concerning this specific site, I have no more time to move back and have used hooks to manage the different taxonomies (add et modify).
I will take some time in the next week to better understand your approach with relationship and be prepared as soon as a new site will require it.