Skip to content

Instantly share code, notes, and snippets.

View anil826's full-sized avatar
🏠
Working from home

Anil anil826

🏠
Working from home
  • New Delhi , India
View GitHub Profile
@anil826
anil826 / example.html
Last active January 15, 2023 17:51
Jquery-lan-translator
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
</head>
<body>
<div>
<div>
<div>
@anil826
anil826 / validation.js
Last active May 11, 2021 13:10
Custome Javascript Validation
$(".finish").on("click", function (ev) {
ev.stopImmediatePropagation();
let isValid = true;
//Loop on all formyoula fields
Object.keys(formyoula.form_fields).forEach(function(component_id) {
//Regex for element component id
if (/^[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}$/.test(component_id)) {
//Get component
let component = formyoula.form_fields[component_id];
//Check if component attribute is available and value is empty
@anil826
anil826 / Risk.css
Created April 29, 2021 10:56
Risk.css
<style>
p {
font-size: 12px;
font-weight: normal;
}
table {
max-width: 890px;
font-size:12px;
border-collapse: collapse;
display: table;
@anil826
anil826 / Risk.html
Created April 29, 2021 10:57
RickPDFHTML
<section>
<div class="wrapper">
<main class="page-body">
<table align="center" border="1" cellpadding="0" cellspacing="0" style="width: 890px;">
<tbody>
<tr height="60px">
<td style="width: 188px; "><img alt="" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfgAAAChCAYAAAAr3q30AAAgAElEQVR4Ae2dBZhdxdnHKe5aXIoUK8XdvbhDKS4tH06wIAVSJGiRtmghQIgTAkk2rhvPZuPu7i67Gw/v9/wGJp09OXrvXN2Z57l77t5zzsg78n9t3tlMXHIUcBRwFHAUcBRwFCg6CmxWdC1yDXIUcBRwFHAUcBRwFBAH8G4QOAo4CjgKOAo4ChQhBRzAF2GnuiY5CjgKOAo4CjgKOIB3Y8BRwFHAUcBRwFGgCCngAL4IO9U1yVHAUcBRwFHAUcABvIj8/PPPsnLdeqlYu042/PxzxkYF5bjkKOAokDsKuDmYO9q7kuNRwOYYrfEAD6BPr6ySx8uGy/kdesuQRUtl3YYN8Xoi4VM2Oy5h0e5xRwFHgV+ZeUcIR4F8poBNnKjRAA8hp1eslEfLhstm37WWLb5rLX/q1FfKFy6RtRkAeZsdl88D1NXNUSBfKeDmYL72jKuXpoDNMVqjAX5m5f/AHYDXIH9ll/5StmCxrLEM8jY7Tg8Gd3UUcBSITwE3B+PTyj2ZGwrYHKM1FuAB98d+ldw1uOvrlg1ayzXdyqQ/IL/enrreZsflZui5Uh0FCpsCbg4Wdv/VhNrbHKM1EuCnVVTJEwOGK5W8BnXvFZC/rluZ9JtvD+RtdlxNGOiujY4Cting5qBtirr8bFPA5hitcQA/ZUWlcqjbtmEb
@anil826
anil826 / backupSunil.pdf.html
Last active August 12, 2020 09:12
sunil backup
<style type="text/css">table,td {
font-family: Arial;
}
</style>
<!-- {{formyoula_repeat_152d-8bfc-7826}} -->
<table border="0" cellpadding="1" cellspacing="1" style="width:100%;">
<tbody>
<tr>
<td>{{3c18-7f4e-9fa4}}</td>
</tr>
@anil826
anil826 / delete_button.js
Last active July 30, 2020 11:37
Updated Javascript for delete button functionality
//On repeate update
var total_prefilled_records;
formyoula.form_fields["8ba9-776a-b85e"].on('input:set:success', function (e) {
//Get total record
total_prefilled_records = formyoula.form_fields["8ba9-776a-b85e"].get('repeat_value').length;
for (var i=0; i<total_prefilled_records ; i++) {
if ( formyoula.form_fields["8ba9-776a-b85e"].get('repeat_value')[i][1].value ) {
$('a[data-item_index="'+i+'"]').hide();
}
}
@anil826
anil826 / updated.js
Last active July 30, 2020 11:05
Updated Javascript for showing header
//On prefill of repeat group
var repeat_group_component_id = "8ba9-776a-b85e";
var increment_counter = 0;
var total_repeat_item_field = 0;
formyoula.form_fields["8ba9-776a-b85e"].on('prefill:success', function (){
formyoula.event_trigger("main:spinner_dialog", { show: true});
total_repeat_item_field = formyoula.form_fields["8ba9-776a-b85e"].get("repeat_value").length;
if (formyoula.form_fields["8ba9-776a-b85e"].get("repeat_value").length ==0) {
$('.custom-loader').hide();
} else {
@anil826
anil826 / sample.html
Created April 14, 2020 14:32
Sample HTML of Email Body
<!--{{#if 770b-a80d-fc65}} -->
<p>xx</p>
{{a2b4-d74a-c254}}
yy
<!-- What to do next starts here-->
<!--{{#if 9647-7b34-541c}}-->
{{95a6-9212-278d}}
<!--R1 starts here-->
<!--{{#if 387e-e9f6-b0cd}} -->
@anil826
anil826 / JsEditor.js
Created December 7, 2018 09:24
JS Editor.
// ==UserScript==
// @id jsAceGit
// @name ACEgist
// @author Anil (anil826)
// @version 0.1.4
// @description ACE editor in your gists
// @match https://gist.github.com/gists/*/edit
// ==/UserScript==
(function (d, cb) {
@anil826
anil826 / syngentabck.js
Created January 28, 2020 18:01
syngentabck
<script type="text/javascript" src="https://d3iyvxaud7i110.cloudfront.net/vendor/jquery/jquery-2.1.3.min.js"></script>
<script>
(function(){
$(".is_checked_new").attr("style","display:none");
$(".is_checked_existing").attr("style","display:none");
if ($(".is_checked_existing").attr("data-field_value") === "No") {
$(".is_checked_existing").attr("style","display:block");
}
if ($(".is_checked_new").attr("data-field_value") === "Yes") {
$(".is_checked_new").attr("style","display:none;");