Skip to content

Instantly share code, notes, and snippets.

View reachkamrul's full-sized avatar
😁

Md Kamrul Islam reachkamrul

😁
View GitHub Profile
function autoFiller(pagePostID, obj){
jQuery.each( obj, function( i, val ) {
jQuery('.'+pagePostID+' input[placeholder="'+i+'"]').val(val).trigger('change');
});
}
autoFiller('postid-5412', { 'From ID': '40',})
<?php
/**
* WP USER LIST
*/
add_filter('fluenform_rendering_field_data_select', function ($data, $form) {
if ($form->id != 7) {
return $data;
}
/**
* Woocommerce/post category
*/
/* Custom Editor SmartCode
* {my_product_cat}
*/
add_filter('fluentform_editor_shortcode_callback_my_product_cat', function ($val) {
global $post;
$terms = get_the_terms( $post->ID, 'product_cat' );
jQuery( '<button class="ninja_button btn custom_print" style="background-color: rgb(0, 0, 0); color: rgb(255, 255, 255);">Custom Print</button>' ).insertBefore( ".ninja_button_print" );
jQuery('.custom_print').on('click', function(){
window.print();
})
add_action('recaptcha_custom_function', 'recaptcha_custom_function_callback', 10, 1 );
function recaptcha_custom_function_callback( $form) {
echo '
<script type="text/javascript">
jQuery( document ).ready(function() {
jQuery(".ff-btn-submit").attr("disabled", "true");
});
function enableBtn(){
jQuery(".ff-btn-submit").removeAttr("disabled");
}
document.onkeydown = function (e) {
if (event.keyCode == 123) {
return false;
}
if (e.ctrlKey && e.shiftKey && e.keyCode == "I".charCodeAt(0)) {
return false;
}
if (e.ctrlKey && e.shiftKey && e.keyCode == "C".charCodeAt(0)) {
return false;
}
var placeholder = "Any Placeholder You want";
jQuery('.iti--allow-dropdown').on('click', function(){
jQuery('.ff-el-phone').attr('placeholder', placeholder)
})
jQuery('.ff-el-phone').on('change', function(){
jQuery('.ff-el-phone').attr('placeholder', placeholder)
})
jQuery('.ff-el-phone').attr('placeholder', placeholder)
add_filter('fluentform_validate_input_item_input_password', function($errorMessage, $field, $formData, $fields, $form) {
$target_form_id = 8;
if($form->id != $target_form_id ) {
return $errorMessage ;
}
if( $formData['password'] != $formData['password_1'] ){
$errorMessage= ['Error! Password does not match'];
add_filter('fluentform_file_type_options',function($types){
$types[]=array(
'label' => __('MP4 Only', 'fluentform'),
'value' => 'mp4'
);
return $types;
});
--Minus, Checkmark and Crossmark Icons--
[nt_icon icon="remove" color="red"]
[nt_icon icon="check" color="green"]
[nt_icon icon="minus" color="#7A7A7A"]
-- Star Icons -
[nt_icon icon="star" color="red"]
[nt_icon icon="star-0" color="red"]