Need to Filter wpv-control-postmeta to only show a drop down realated to parent
Started by: cameronJ-3
in: Toolset Professional Support
Quick solution available
Problem:
How to filter search dropdown items limited to the repeatable field?
Solution:
Toolset does not have that filter feature. You can use the workaround below:
- Add a view that lists the repeatable field items and add them as an HTML hidden field.
- Add the custom JS below to the content template that you use to replace the content of the search dropdown with the hidden fields:
jQuery(document).ready(function() {
var theTracks = '<option value="" selected="selected">Choose a track</option>';
jQuery('#track-options > input').each(function(){
theTracks += '<option value="' + jQuery(this).attr('value') + '">' + jQuery(this).attr('value') + '</option>'
});
jQuery('select[name="wpv-wpcf-track-name"]').html(theTracks);
});
2
10
3 years, 10 months ago
cameronJ-3
content template content displays in addition to regular content
Started by: Steve
in: Toolset Professional Support
Quick solution available
2
3
3 years, 10 months ago
Steve