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

When using form templates, cant use captcha control on form #21

Closed
valadas opened this issue Jun 16, 2018 · 6 comments
Closed

When using form templates, cant use captcha control on form #21

valadas opened this issue Jun 16, 2018 · 6 comments

Comments

@valadas
Copy link
Member

valadas commented Jun 16, 2018

No description provided.

@SCullman
Copy link
Contributor

Well, it is possible, but the form generator ignores the captcha. But it can be included manually:

<div class="form-horizontal">
    <div class="form-group">
        <div class="col-md-2">[label-for:Test]</div>
        <div class="col-md-10">[editor-for:Test]</div>
    </div>
   <div class="form-group">
        <div class="col-md-2">Captcha</div>
        <div class="col-md-10">[editor-for:Security Code]</div>
    </div>
</div>

turns into

image

@valadas
Copy link
Member Author

valadas commented Jun 17, 2018

I have resolved this issue in another way, also adding support for Google ReCaptcha, but I like that you can place it in your form template, I just learned that. But I think my implementation and this wont work together, I am testing... Would be nice to combine this token and still keep the Recaptcha option.

@valadas
Copy link
Member Author

valadas commented Jun 17, 2018

@SCullman Can you point me in the right direction here, where is [editor-for:Security Code] getting replaced by the captcha control?

@valadas
Copy link
Member Author

valadas commented Jun 17, 2018

@SCullman never mind, I found an issue where it was being added twice on the page from the last commit, I am working on it, I should be able to make both features work in #30 I am on it.

@SCullman
Copy link
Contributor

@valadas in Form.ascx.cs, line 91.
It should be possible. The id of the captcha control is generated out of the title, in that case it is defined as "Security Code" within the resx file. Too much tricks, isn't it?

@valadas
Copy link
Member Author

valadas commented Jun 18, 2018

In the resx file, would'nt that break the form template if someone translates it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants