Skip Navigation

[Resolved] Data-dependent filters

This support ticket is created 4 years, 8 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)

Author
Posts
#1558085

Tell us what you are trying to do?

I have a Start Date and End Date input fields. I want to display the End Date if and only if the Start Date is entered. It should be dynamic while the end user is filling out the custom type form.

Is there any documentation that you are following?

https://toolset.com/documentation/user-guides/front-end-forms/conditional-display-for-form-inputs/

Is there a similar example that we can see?

No

What is the link to your site?

N/A

#1559637

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

I want to display the End Date if and only if the Start Date is entered. It should be dynamic while the end user is filling out the custom type form.
==>
Do you mean that you have a post form where you have two fields associated with that post type Start Date and End date and when user interacting with the post form you want to hide the End date field untile user select the start date - Is this correct?

#1560471

You are correct!

By the way, the "Reply" links in your support area do not work in both Chrome and Firefox (on Ubuntu).

#1561195

Minesh
Supporter

Languages: English (English )

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

You are correct!
==>
Ok that's great.

You can simple activate the Advanced Mode available just above the top right corner and try to add the [cred_show_group ] shortcodde.

So, you can wrap the field which you want to display conditionally, in this case it should be your End date field. Please check the following example:

[cred_show_group if="( $(tour-date) ne '' )" mode="fade-slide"]
	<div class="form-group">
		<label>tour-comments</label>
		[cred_field field='tour-comments' force_type='field' class='form-control' output='bootstrap']
	</div>
[/cred_show_group]

Where:
- replace tour-date with your original start-date field slug and replace the other HTML inside the shortcode with your end date field html.

More info:
=> https://toolset.com/documentation/user-guides/front-end-forms/conditional-display-for-form-inputs/

By the way, the "Reply" links in your support area do not work in both Chrome and Firefox (on Ubuntu).
==>
thanks for the report. I will pass it to the concern person who is handling such issues.