Dear Sir/Madam,
I have a custom search
<div class="form-group">
[wpv-control-postmeta field="wpcf-estate" type="select" source="custom" url_param="wpv-wpcf-estate" values="[wpv-view name="options-estate-key"]" display_values="[wpv-view name="options-estate"]" default_label="請選擇屋苑"]
</div>
wpv-view of options-estate
<!-- wpv-loop-start -->
<wpv-loop>[wpv-item index=1][wpv-post-title][wpv-item index=other],[wpv-post-title]</wpv-loop>
<!-- wpv-loop-end -->
wpv-view of options-estate-key
<!-- wpv-loop-start -->
<wpv-loop>[wpv-item index=1][wpv-post-slug][wpv-item index=other],[wpv-post-slug]</wpv-loop>
<!-- wpv-loop-end -->
I create both the options-estate and options-estate-key because I need a CRED form for the user to update the estate list, don't know why only the first and the last options contain a lot of space after the View rendering. What is the problem?
Best regards,
Kelvin.
Dear Kelvin,
As your request:
https://toolset.com/forums/topic/getting-url-parameter-as-default-value-in-custom-search/#post-1322883
I have taken this ticket, please share your website credentials, then update this thread.
I have done below modifications in your website:
Edit the post view "Options - Estate Key":
hidden link
in section "Loop Editor":
1) Wrap all codes into shortcode:
[wpv-noautop] ... [/wpv-noautop]
This will be able to remove line breaks
2) change line 1~6 to:
[wpv-noautop][wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop>[wpv-item index=1][wpv-post-slug][wpv-item index=other],[wpv-post-slug]</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
Remove all space of each line.
Test it in front-end:
hidden link
It works fine, please check if it is what you want, thanks