Hi !
After applying the advices of Waqar to modify my CSS I discover that my form was displaying correctly only once it is displayed out of a form in a "no found items" result.
Instead of displaying "no found items" in a search view, I'm displaying a form with a recaptcha.
While the recaptcha is displaying correctly in a block display as it was a separate page, it disappear while this form is included in my search view.
I tried to generate a new form and use it "by default", the recaptcha is not displaying either.
That's why I think there's a bug. Can you please confirm or help me ?
Hi,
Thank you for contacting us and I'd be happy to assist.
The reCaptcha field is not showing properly when the form is included in the view, because the view is set to update the search results through AJAX.
The dynamic features in the form like date picker field, reCaptcha field, etc are known to be affected when the form is loaded dynamically, without the page reload/refresh. There are plans to improve this for future releases, but I'm afraid, I don't have a time estimate to share.
You have two options:
1. You can include a "submit" button in the view's search form and set it to update the results without AJAX.
OR
2. You can remove the form from inside the view's "Loop Editor" and instead add in the bottom of the "Output Editor":
<div class="search-form">[cred_form form="search-request-form-horizontal"]</div>
In the view's CSS editor, you'll add the CSS code to hide this form when the page is loaded:
.search-form {
display: none;
}
And in the view's "wpv-no-items-found" tag, where the form was previously added, you can include some more CSS code, to show the form only when the view's search returns no results:
<style> .search-form { display: block !important; } </style>
regards,
Waqar
My issue is resolved now. Thank you!