Hi, I have repeating field group and using Toolset Forms to let user add this repeating field group themselves, so basically the situation is like this :
- I have a page where there are a Views that list all their published post with a hyperlink and urlparam for the chosen post ID to a next page
- Inside the next page is a Forms to add this repeating field group, and inside repeating field group I want to copy some terms that the parent post have using the urlparam provided
- I have already insert the shortcode in Forms like this :
- And the result in the front end is not something I expected, where the input field is not showing and the code broken, I notice that I am using shortcode inside shortcode with another shortcode
So, what I want to ask :
1. Is it possible to generate the default value using shortcode like that, or there are any better method?
2. I notice that with the new Toolset Forms I can add repeating field group post and select which parent post for the newly created post, so can I generate the value of some field after user choose the parent post, the value that I want generate is several taxonomies from parent post?
3. The reason I want to copy several taxonomies from parent post to the repeating field group is to show the field when using plugin WP All export to export the post type into excel file, in the query for repeating field group I can put php function to call the field from the parent post (I think), the look of the option in the WP All Export is like the attachment, can you help me to what to add in the php function if I want to get the taxonomies from the parent post? I am not very familiar around php function itself
1. This can actually work but I see where you are using the [wpv-search-term] in an item attribute of the [wpv-post-taxonomy] shortcode.
[cred_field field="merek-mesin" post="product-report" value="[wpv-post-taxonomy type='merek-mesin' format='name' item='[wpv-search-term param='merek-mesin']']" class="form-control" output="bootstrap"]
To pass the url attribute into the [wpv-post-taxonomy] then you must use the ID attribute.
2. Here with the generation of the values ? i'm actually not sure what you mean here since Repeatable field groups can't have taxonomies.
3. The repeatable field groups are special type of parent/child relationship. Which from what I can see from the backend is that you wouldn't be able to add taxonomies to it. Since they are related to the Parent post then they would automatically inherit the parent's taxonomies.
Perhaps I am missing something but repeatable field groups don't have taxonomies.
Thanks for your response, sorry I think I miss something, so this is additional things that I have done:
- In the parent post I have some taxonomies assign, let says it have: taxonomy 01, taxonomy 02, taxonomy 03
- And in the repeatable field groups I have some single line field (this is the field that I want to fill with the value of parent taxonomies), so in the repeatable field groups there will no taxonomies but instead text field with the same value as the parent taxonomies
1. Actually, when I test out just using this shortcode below the mentioned cred field : [wpv-post-taxonomy type='merek-mesin' format='name' item='[wpv-search-term param='merek-mesin']'], it return the value I wanted, but when I put it into the cred field default value, it break the code in the front end and not render the field.
I think it is because I put the shortcode for item= ?
But, I have already found out the solution for this, so in the Views of 1st page, in the url link of each item that goes to Toolset Forms I pass several url param like this :
In that way I can pass several taxonomies value of the selected post into the Forms in the next page. But, can I hear your input for this, because if I can just pass the ID parent post and use it in item= shortcode inside the cred field it will make a cleaner code in the url
2. Like my explanation above, I want to pass the value of parent taxonomies into the single line field in my repeatable group fields
3. Yes, the same for number 2, is there a php function that can listen what the specific parent taxonomies have and return the value in the repeatable field groups?