Skip Navigation

[Resolved] Conditional field

This support ticket is created 4 years, 5 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 6 replies, has 2 voices.

Last updated by larryL 4 years, 5 months ago.

Assisted by: Minesh.

Author
Posts
#1380421

I would like to use a radio button value in a post form to trigger a different form. 1) is this possible? 2) can I prepopulate some of the values when the second post form opens?

Thanks!

#1380611

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I would like to use a radio button value in a post form to trigger a different form.
1) is this possible?
==>
Basically, you can use the Toolset Form's conditional display that is by default set to use with custom field. Please check the following Doc:
- https://toolset.com/documentation/user-guides/cred-conditional-display-engine/

I ran a test and try to add another form within the [cred_show_group] shortcode and it does not work. So, its not possible.

2) can I prepopulate some of the values when the second post form opens?
===>
Yes, with each form field, you can add or should have the attribute URL param. For example:

[cred_field field='post_title' class='form-control' output='bootstrap' urlparam='title']

For example: hidden link

As you can see with urlparam attribute, it will listen to the URL param title and if title attribute available in the URL it will fill out the associated value to it, in this case Mike.

#1381221

SO I understand your response - it is not possible to trigger a seperate form from within a form but I can populate values from one form to another? If I can do B, why can't I do A?

#1381709

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

SO I understand your response - it is not possible to trigger a seperate form from within a form but I can populate values from one form to another? If I can do B, why can't I do A?
==>
Yes - - it is not possible to trigger a seperate form from within a form especially using the [cred_show_group] and added the form to display within it to display conditional output.

I can populate values from one form to another? If I can do B, why can't I do A?
==>
Yes, but in specific case. Lest say you have added form X to page A and form Y to page B and when you submit the form X you will be redirected to page B where form Y is added. so, there is a way to pass the URL params to page B and you can catch the URL param value using the attribute urlparam available with every form field.

For example: hidden link
-- So, in this case you submit the form from page A and it will be redirected to page B with URL param title and you can listen to title attribute using the cred-field shortcode attribute URL param i.e. urlparam='title'

For example:

[cred_field field='post_title' class='form-control' output='bootstrap' urlparam='title']
#1382399

Sorry, just for further clairification just to make sure we are on the same page. I do not need the second form to be embeded in the first form. I just need the selection of a specific value of the radio button field to trigger another form. It could be in a modal or in another window or another page....

#1382731

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I do not need the second form to be embeded in the first form.
==>
Yes, I understand that and I know.

I just need the selection of a specific value of the radio button field to trigger another form. It could be in a modal or in another window or another page....
==>
Yes, there is no such native feature available. It needs a custom JS/jQuery code that is beyond the scope of our support policy.

However, the following are the links that may help you. You should try to add another form to some div and show and hide it accordingly;
=> hidden link
=> https://stackoverflow.com/questions/5940963/show-and-hide-divs-based-on-radio-button-click
=> hidden link
=> hidden link

#1384271

Gotcha. Thank you for the clarification!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.