- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-23-2017 04:20 AM
Hi Everyone,
My requirement is how we can implement to captcha in record producer?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-23-2017 04:45 AM
Hi Pavan,
please follow below code to implement 3rd party captcha. Google has provided one api you can use that one.
Create one variable with type UI page in Record Producer form.
Below is UI page code that has to be picked on form side.
#Might be helpful for community people.
HTML Template :
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<script>https://www.google.com/recaptcha/api.js"></script>
<style>
table {
margin: 0 auto;
z-index: 1;
}
</style>
<g:ui_form onsubmit="validateform()" >
<table class="formTable table-bg font-style14" >
<tr><td>
<div class="g-recaptcha" data-sitekey="6LeiwAYTAAAAAAscPMJuMno9Tbwt3KXqSEPmQhu2"></div>
</td>
</tr>
</table>
</g:ui_form>
<style>
.formTable {
margin-left: 20%;
}
.formTable tr td {
padding: 20px
}
</style>
</j:jelly>
Client script :
function validateform(){
if(captcha_response.length == 0 ) {
return false;
}
else{
return true;
}
}
Thanks,
Jeet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-23-2017 04:25 AM
Hi Pavan,
This should help you out: Including a Captcha on Catalog Items | Jeff Benedict
Thank You
Please Hit Like, Helpful or Correct depending on the impact of response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-23-2017 04:45 AM
Hi Pavan,
please follow below code to implement 3rd party captcha. Google has provided one api you can use that one.
Create one variable with type UI page in Record Producer form.
Below is UI page code that has to be picked on form side.
#Might be helpful for community people.
HTML Template :
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<script>https://www.google.com/recaptcha/api.js"></script>
<style>
table {
margin: 0 auto;
z-index: 1;
}
</style>
<g:ui_form onsubmit="validateform()" >
<table class="formTable table-bg font-style14" >
<tr><td>
<div class="g-recaptcha" data-sitekey="6LeiwAYTAAAAAAscPMJuMno9Tbwt3KXqSEPmQhu2"></div>
</td>
</tr>
</table>
</g:ui_form>
<style>
.formTable {
margin-left: 20%;
}
.formTable tr td {
padding: 20px
}
</style>
</j:jelly>
Client script :
function validateform(){
if(captcha_response.length == 0 ) {
return false;
}
else{
return true;
}
}
Thanks,
Jeet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-23-2017 05:19 AM
thank you,
your code is helpful for me...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-16-2022 08:32 AM
NOT SUPPORTED.
I've spent hours trying to get this to work only to realize this solution uses Jelly which is not currently supported in the Service Portal.
Ref: https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0756502
- AJ