Hello.. I am displaying a view and I have a Post Search filter which is a search term set by the View shortcode attribute.
If the View does not return any rows, then in the [wpv-no-items-found] section, I am calling a CRED Form to insert a new post. I would like to pass that filter parameter value from above to the CRED Form.
Is it possible to pass the value?
Please help. Thank You.
Satin
Hi Satin,
Thank you for contacting us and I'll be happy to assist.
The "cred_field" shortcode ( ref: https://toolset.com/documentation/user-guides/cred-shortcodes/#cred_field ) accepts "urlparam" attribute, which can be used to get the value from the URL.
For example:
[cred_field field="field-name" class="form-control" output="bootstrap" urlparam="wpv_post_search"]
The above shortcode for the field "field-name" will use the value from the search filter's URL with "wpv_post_search".
I hope this helps.
regards,
Waqar
Hi Waqar,
I don't pass the value via urlparam. It is passed to the view via a shortcode.
1. The view receives the value via a shortcode as a parameter (1st image).
2. If no data is found, the CRED form is called. This is where I need to pass that value over. (2nd image)
3. The field in the CRED form needs to receive that value (3rd image).
How can I achieve this? Is it possible to pass the value to the form?
Thanks,
Satin
My issue is resolved now. Thank you!