Skip Navigation

[Resolved] Cred Form: add form-parameter

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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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 1 reply, has 2 voices.

Last updated by Waqar 2 months, 4 weeks ago.

Assisted by: Waqar.

Author
Posts
#2680433

Hi,

i'm have a post form with some select options. Depending on the form shortcode i want to edit the options dynamically.
For example: if i use [cred_form form="1" usetermmeta="A"] i want to fill the options with some term metas. And others Options in [cred_form form="1" usetermmeta="B"]
How can i do that?

Best regards

#2680579

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

The 'cred_form' shortcode doesn't support additional shortcode attributes.
( ref: https://toolset.com/documentation/programmer-reference/forms/cred-shortcodes/#cred_form )

To make this dynamic, you can alternatively, pass on the target values through the URL parameter, e.g.:
{yourwebsite.com}/page-with-form/?target-value=A

The value from a URL parameter like 'target-value' can be used as the individual field's default value, through the 'urlparam' attribute:
https://toolset.com/documentation/programmer-reference/forms/cred-shortcodes/#cred_field

You can also use the 'wpv-search-term' shortcode in the form to get this URL parameter value, independently:
( ref: https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-search-term )


[wpv-search-term param='target-value']

I hope this helps and please let me know if you need further assistance.

regards,
Waqar

#2681413

Mh, too bad.
The page is linked default in the navigation without any parameter.

I found a solution by my own: the form ist addet via [cred_form form="x"]. In my taxonomie i have a option to ask for the page, where the form is inckuded. So i have the post_id in my form, look for the terms in the taxonomy associated with this id.
Its not elegant editorially but the best for now.

Best regards

ricoF confirmed that the issue was resolved on 2024-02-02 12:40:47.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.