Skip Navigation

[Resolved] Split: Unable to customise post relationship form – change the select2 placeholder in relationship form

This thread is resolved. Here is a description of the problem and solution.

Problem:
change the select2 placeholder in relationship form

Solution:
To change the placeholder in relationship form you need to add custom JS/jQuery code to your form's JS box.

You can find the proposed solution, in this case, with the following reply:
=> https://toolset.com/forums/topic/split-unable-to-customise-post-relationship-form-change-the-select2-placeholder-in-relationship-form/#post-1202317

Relevant Documentation:

This support ticket is created 5 years, 10 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 2 replies, has 2 voices.

Last updated by Greig Neilson 5 years, 10 months ago.

Assisted by: Minesh.

Author
Posts
#1202314

I would like to change the label on Routes to read "Please select a route." I also want to customise the "search for a post" to "search for a route"

#1202317

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Well - to change the placeholder in relationship form you need to add custom JS/jQuery code to your form's JS box.

I've added the following code to your relationship form's JS box to change the select2 placeholder.

jQuery(document).ready(function($){
    $('.toolset_select2-selection__placeholder').text('search for a route');

});

I can see now the select2 displays the placeholder as per your requirement.
=> hidden link

#1202777

My issue is resolved now. Thank you!