This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (window.location.hash.includes('ticket') && window.fs_customer_portal) { | |
setTimeout(function(){ | |
jQuery('.fs_reply_text').click(); | |
}, 100); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('fluent_support/before_ticket_create_from_email', function($responseOrTicketData, $customer){ | |
if (function_exists('FluentCrmApi')){ | |
$contactApi = FluentCrmApi('contacts'); | |
$contact = $contactApi->getContact($customer->email); | |
if (!$contact) { | |
exit; | |
} | |
} | |
}, 10, 2); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string = input("Enter a string: ") | |
dictonary = {} | |
for char in string: | |
dictonary[char] = dictonary.get(char, 0) + 1 | |
for key, value in dictonary.items(): | |
print(f"{key}: {value}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Method 1 | |
var form = $('#fluentform_1976'); //YOUR FORM ID HERE | |
form.on('submit',function(){ | |
var firstName = $('#ff_1976_names_first_name_').val(); // YOUR FORM INPUT NAME ID HERE | |
var lastName = $('#ff_1976_names_last_name_').val(); // YOUR FORM INPUT NAME ID HERE | |
window.location = 'http://api.whatsapp.com/send?phone=5521997832127&text=Quero-Desenhar%0A%20'+firstName+'%20'+lastName; | |
}); | |
//Method 2 | |
var firstNameKey = "first_name"; // give your first name fields Name attributes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"metadata": { | |
"id": "d4be9b84-09b5-42d9-83e3-a0135f3a807c", | |
"publisherId": "anthonydiametrix.ACF-Snippet", | |
"publisherDisplayName": "anthonydiametrix" | |
}, | |
"name": "ACF-Snippet", | |
"publisher": "anthonydiametrix", | |
"version": "1.9.0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'wp_footer', 'booking', 999999999); | |
function booking(){ | |
$formId = 43; //Target a specific form here by id | |
$fields = wpFluent()->table('fluentform_submissions') | |
->where('form_id', $formId) | |
->get(); | |
$toDisable = []; | |
foreach ($fields as $key=>$value) { | |
$response = json_decode($value->response); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let max = $('.max').val(); | |
$('.text').keydown(count); | |
function count(event) { | |
let len = $('.text').val().split(/[\s]+/); | |
if (len.length > max) { | |
if ( event.keyCode == 46 || event.keyCode == 8 ) {// Allow backspace and delete buttons | |
} else if (event.keyCode < 48 || event.keyCode > 57 ) {//all other buttons | |
event.preventDefault(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('fluentform_filter_email_attachments', function($emailAttachments, $notification,$form, $submittedData){ | |
$target_form_id = 38; | |
if($form->id != $target_form_id){ | |
return; | |
} | |
$url = "https://www.australianshiatsucollege.com.au/documents/Prospectus.pdf"; | |
$tmp = download_url($url); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const btn = document.querySelector('.calculate'); | |
btn.type = 'button'; | |
let numbers = document.querySelectorAll('form [type="number"]'); | |
numbers[numbers.length-1].closest('div').parentElement.insertAdjacentHTML('afterend',`<span class="calc"></span>`); | |
const resultEl = document.querySelector('.calc'); | |
resultEl.style.display = 'none'; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Use this code only inside the functions.php file | |
* this method will register event to WordPress init | |
*/ | |
add_action( 'init', 'registerCronForAutoDeleteDbTable'); | |
function registerCronForAutoDeleteDbTable(){ | |
if( !wp_next_scheduled( 'delete_data_after_month' ) ) { | |
// schedule an event | |
wp_schedule_event( time(), 'monthly', 'delete_data_after_month' ); |
NewerOlder