Skip to content

Instantly share code, notes, and snippets.

@jaoltr
jaoltr / Zoho_Flow_Address_Fixer.deluge
Created January 23, 2025 18:01
Zoho Flow Deluge Custom Function To Fix Address Via Google Maps API
string address_fix_google_maps(string customer_address)
{
// Define your API key and the base URL for Google Maps Places API
apiKey = "Your_Google_API_Key";
baseUrl = "https://places.googleapis.com/v1/places:searchText";
fields = "places.formattedAddress";
hdrs = Map();
hdrs.put("Content-Type","application/json");
hdrs.put("X-Goog-Api-Key",apiKey);
hdrs.put("X-Goog-FieldMask",fields);
@jaoltr
jaoltr / Zoho_Flow_Fetch_Lead_By_Phone.deluge
Created January 23, 2025 17:59
Zoho Flow Deluge Custom Function Fetch CRM Lead by Phone
map fetchCRMleadByPhone(string phoneNumber)
{
// Initialize the return map with default values
resultMap = Map();
resultMap.put("found",0);
resultMap.put("Lead_ID","");
resultMap.put("First_Name","");
resultMap.put("Last_Name","");
resultMap.put("Street","");
resultMap.put("City","");
@jaoltr
jaoltr / Zoho_Flow_Fetch_Contact_By_Phone.deluge
Created January 23, 2025 17:57
Zoho Flow Deluge Custom Function - Fetch Contact by Phone
map fetchCRMcontactByPhone(string phoneNumber)
{
// Initialize the return map with default values
resultMap = Map();
resultMap.put("found",0);
resultMap.put("Contact_ID","");
resultMap.put("First_Name","");
resultMap.put("Last_Name","");
resultMap.put("Mailing_Street","");
resultMap.put("Mailing_City","");
@jaoltr
jaoltr / Zoho_Flow_Better_Pushover_Deluge
Created January 23, 2025 17:55
Better Pushover Zoho Flow Deluge Custom Function
void pushoverWithOptions(string user_key, string token, int html, string title, string msg, string sound, string url, string url_title)
{
if(user_key = "")
{
user = "your_pushover_user_key";
}
else
{
user = user_key;
}
@jaoltr
jaoltr / fixname.js
Last active March 23, 2025 18:54
Fix autofill name duplication
document.addEventListener("DOMContentLoaded", function() {
const nameFirstInput = document.querySelector('input[name="name_first"]');
const nameLastInput = document.querySelector('input[name="name_last"]');
// Function to convert text to proper case
function toProperCase(text) {
return text
.toLowerCase()
.replace(/\b\w/g, function(char) { return char.toUpperCase(); });
}
@jaoltr
jaoltr / checkout.js
Last active December 10, 2023 20:37
get checkout - submit url params to php function
async function getCheckoutUrl() {
try {
// Get URL params
const params = new URLSearchParams(window.location.search);
// Make the request to the PHP function
const response = await fetch("/php/get_checkout_url.php", {
method: "POST",
body: JSON.stringify(Object.fromEntries(params)),
headers: {
@jaoltr
jaoltr / noShow.css
Created December 27, 2022 10:54
CSS to visually hide elements while still accessible to screen readers
.noShow {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}