[Resolved] Using Taxonomies Views to select custom taxonomies in Toolset Forms (CRED)
This thread is resolved. Here is a description of the problem and solution.
Problem:
How to pre-select a taxonomy field in a Post Form based upon the links to that form generated by a Taxonomy View?
Solution:
It is not possible to pre-select a taxonomy in Forms.
It is possible to use the value or urlparam arguments of the cred_field shortcode to pre-select the value of a *custom field*, but it doesn't work for taxonomies.
We have a feature request to make those arguments work the same for taxonomies as for custom fields.
This support ticket is created 6 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Hi, I am currently working on web reporting tool for mobile web.
In this web user can submit report for each product using Toolset Form that is already built, and for each product there is a Taxonomies for its categories.
And from client side, they can add this taxonomies themselves
What I want to ask are :
1. Can I make a Views of this taxonomies in one page, and when user click on the link they will redirected into a page where the Toolset Forms with the selected Taxonomies is in there? (the image is in the attachment
Note, the client can add the taxonomies themselves, so I have to make it all automatically, for the Taxonomies Views and Toolset Forms
2. For user creation, can admin restrict users what taxonomies category they capable to post the report using Toolset Access by simply selecting the fields in User Fields?
You create a taxonomy View to display the terms of that taxonomy, and for the Loop Output you make links to a static page that contains the form, and append the taxonomy slug as a URL parameter, e.g.
<a href="<em><u>hidden link</u></em>">Link to [wpv-taxonomy-title]</a>
Then in the form which is inserted into the linked page be sure to include a field for the taxonomy in question (which should be included if auto-generating the form markup).
Edit the shortcode for this field and specify the URL parameter you add to your link to set the default value.
Now when you arrive at that form from the list of taxonomy terms, the term will be pre-selected. (You'll need to hide the field with CSS if you don't want the user to change it.)
The second question is not something you can readily do with Toolset. You can use Access to control taxonomies (see screenshot for an example "colour" taxonomy), but that means controlling the rights to add or delete terms etc., not to whether they can see such terms in a Taxonomy View or see posts with such terms assigned etc.
In the front end it already working fine, it return the url link with the taxonomy slug.
And in Cred I also have the shortcode for this taxonomy field like this :
[cred_field field='merek-mesin' display='checkboxes' urlparam='merek-mesin' output='bootstrap']
But in the front-end form I don't have any taxonomy field already pre selected at all
Is it something that I miss in the shortcode?
Fyi, the custom taxonomy slug that I am using is called "merek-mesin"