Skip Navigation

[Gelöst] [cred_show_group] not working in relationship form

This support ticket is created vor 4 Jahre, 3 Monate. 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.

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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

This topic contains 2 Antworten, has 2 Stimmen.

Last updated by kaneB vor 4 Jahre, 3 Monate.

Assisted by: Nigel.

Author
Artikel
#1455677

I want to show/hide a custom field in a relationship form (for an intermediary post type in many-to-many relationship) based on the selection of another custom field in the same setting. [cred_show_group] does not seem to work and is displaying the shortcode as text on the front end.

[cred_show_group if="($(asset-movement-type) eq 'Issue Out')"  mode='slide']	
	<div class="form-group">
		<label>Asset Issue Date</label>
		[cred-relationship-field name='asset-issue-date']
	</div>
[/cred_show_group]

Can I use this shortcode in relationship form? If not what is my alternative to achieve the same?

#1456073

Nigel
Supporter

Languages: Englisch (English ) Spanisch (Español )

Timezone: Europe/London (GMT+01:00)

Screenshot 2020-01-13 at 13.10.03.png

When editing a Relationship Form with the visual editor you'll notice that the section to add a conditionally-displayed group which is normally available (see screenshot) is missing: there is no support for conditional field display in relationship forms.

You can request it be added: https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/

That won't help much right now, though. If you want such functionality you would need to build it yourself with some JavaScript/jQuery.

Use the DOM ready event to hide the section you want to conditionally display.
Add an event listener to detect changes in the input for the field which would trigger the display and use it to toggle the visibility of the hidden section.

#1459177

Alright noted. I have logged a feature request. Nothing can be done now.

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