Sauter la navigation

[Résolu] dropdown default value not working

This support ticket is created Il y a 5 années et 11 mois. 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)

Marqué : ,

Ce sujet contient 2 réponses, a 2 voix.

Dernière mise à jour par malagaS Il y a 5 années et 11 mois.

Assisté par: Waqar.

Auteur
Publications
#1213358

I am trying to: [wpv-control-post-relationship ancestors="client@client-project.parent>project@project-task.parent" placeholder="Client" url_param="wpv-relationship-filter"]

Link to a page where the issue can be seen: lien caché

I expected to see: 'Client' as the first choice in the dropdown

Instead, I got:

#1213681

Hi Malaga,

Thank you for contacting us and I'll be happy to assist.

As mentioned in the documentation, the "wpv-control-post-relationship" shortcode, doesn't support any "placeholder" attribute:
https://toolset.com/documentation/user-guides/views-shortcodes/#vf-521622

To include an empty default select option in that select field, you can use a custom script, as suggested in this thread:
https://stackoverflow.com/a/1070841

I hope this helps and for more personalized assistance around custom code, you can consider hiring a professional from our list of recommended contractors:
https://toolset.com/contractors/

regards,
Waqar

#1214331

my workaround was a reset button. but it would be nice to have a placeholder to 'choose all'. just not worth custom scripting. thanks!