Skip Navigation

[Resolved] Passing value from View to CRED Form

This support ticket is created 5 years, 12 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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 3 replies, has 2 voices.

Last updated by SatinS5964 5 years, 12 months ago.

Assisted by: Waqar.

Author
Posts
#1181750

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

#1182146

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

#1182212
Screen Shot 2019-01-11 at 6.05.11 AM.png
Screen Shot 2019-01-11 at 6.04.50 AM.png
Screen Shot 2019-01-11 at 6.04.35 AM.png

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

#1182295

My issue is resolved now. Thank you!