-
-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Description
Hi @Log1x,
Is it possible to set higher priority to render function inside src/HtmlForms.php? The problem is that hCaptcha is looking for some part of HTML code to replace it with captcha fields. Unfortunately, it has the same priority inside filter 'af_form_html' and probably the blade view is rendered after. So the captcha fields are de facto not rendered.
I've tried this solution, and it worked for me.
{
add_filter('hf_form_html', function ($html, $form) {
if (! view()->exists('forms.' . $form->slug)) {
return $html;
}
return view(
Str::start($form->slug, 'forms.'),
['form' => $form->ID]
)->render();
}, 5, 2);
}
Or maybe you know a better solution for this?
Metadata
Metadata
Assignees
Labels
No labels