Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8.7RC: Recaptcha v3 expect input submit #521

Closed
bjarnef opened this issue Mar 25, 2021 · 1 comment
Closed

8.7RC: Recaptcha v3 expect input submit #521

bjarnef opened this issue Mar 25, 2021 · 1 comment

Comments

@bjarnef
Copy link

bjarnef commented Mar 25, 2021

I noticed in the new Recaptcha v3 field type that the javascript expect an input using type=submit. This is fine, but it doesn't take into account that you might want to use a custom them overriding the Form partial view to use <button type="submit">Submitinstead. This is sometimes useful if you e.g. want to add an inlineicon or another child element, which<input type=submit /> doesn't allow.

We an of course override the Fieldtype.Recaptcha3.cshtml in our custom theme, but I wonder if we can modify the following the support <button> element as well?

hiddenField.form.querySelector('input[type=submit]').removeAttribute('disabled');

It could be something like:

hiddenField.form.querySelector('[type=submit]').removeAttribute('disabled');

or

var btnSubmit = hiddenField.form.querySelector('input[type=submit]') || hiddenField.form.querySelector('button[type=submit]');
btnSubmit.removeAttribute('disabled');
@nul800sebastiaan nul800sebastiaan added release/8.7.0 type/feature state/in-sprint We've committed to work on this during the sprint indicated in the milestone labels Mar 25, 2021
@nul800sebastiaan nul800sebastiaan added this to the sprint159 milestone Mar 25, 2021
@warrenbuckley
Copy link

Fixed in this PR due for 8.7.0
https://github.com/umbraco/Forms/pull/464

@umbrabot umbrabot removed the state/in-sprint We've committed to work on this during the sprint indicated in the milestone label Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants