Skip to content

Instantly share code, notes, and snippets.

View reachkamrul's full-sized avatar
😁

Md Kamrul Islam reachkamrul

😁
View GitHub Profile
{
onChange: function(selectedDate, dateString) {
var date = selectedDate[0] ;
date.setDate(date.getDate()+1);
flatpickr('.endingDate', {
"minDate": date,
});
}
}
/*!
* jQuery Rowspanizer Plugin (Modified) v0.1
* https://github.com/marcosesperon/jquery.rowspanizer.js
*
* Copyright 2011, 2015 Marcos Esperón
* Released under the MIT license
*
* https://github.com/jquery-boilerplate/boilerplate/
*/
$shortcodeDefaults = apply_filters('fluentform_info_shortcode_defaults', array(
'id' => null, // This is the form id
'info' => 'submission_count', // submission_count | created_at | updated_at | payment_total
'status' => 'all', // get submission count of a particular entry status favourites | unread | read
'with_trashed' => 'no', // yes | no
'substract_from' => 0, // [fluentform_info id="2" info="submission_count" substract_from="20"]
'hide_on_zero' => 'no',
'payment_status' => 'paid', // paid | all | pending | failed
'currency_formatted' => 'yes',
'date_format' => ''
[fluentform_info id="354" info="submission_count" substract_from="20"]
// Count Footer with fix
function myCustomFunction() {
var sum = 0;
var counts = 0;
$(".totals").each(function() {
var val = $.trim( $(this).text() );
if ( val ) {
val = parseFloat( val.replace( /^\$/, "" ) );
sum += !isNaN( val ) ? val : 0;
{
onChange: function(selectedDate, dateString) {
var date = selectedDate[0] ;
date.setDate(date.getDate());
flatpickr('.endingDate', {
"minDate": date,
});
}
}
// Math summation on columns
var myClasses= "column_one, column_two, column_three"; //give your columns key, you can use multiple by using comma
var totalText = "Total: "; // you can change the 'Total' text here
if(!$table.find('tfoot').length){
jQuery("<tfoot></tfoot>").appendTo($table);
}
// Add dynamic data to fluent form
add_filter('fluenform_rendering_field_data_select', function ($data, $form) {
// Add data to formID 91, you can change the id with your particular form id
if ($form->id != 91) {
return $data;
}
// select only the dropdown name attribute
// change 'dynamic_dropdown' name with your fields dropdown name
if (\FluentForm\Framework\Helpers\ArrayHelper::get($data, 'attributes.name') != 'dynamic_dropdown') {
return $data;
add_filter('ninja_tables_item_attributes', function ($attributes) {
$latest = ninja_tables_DbTable()->where('table_id', $attributes['table_id'])->orderBy('id', 'DESC')->limit(1)->first();
$value = json_decode($attributes['value'], true);
if ($latest) {
$latest = json_decode($latest->value, true);
if (isset($latest['id']) && isset($value['id'])) {
$value['id'] = $latest['id'] + 1;
}
@reachkamrul
reachkamrul / avgFFtoNT.js
Created May 14, 2020 07:24
avgFFtoNT.js
var myClasses= "ratings"; //give your columns key.
var totalText = "Average: "; //give you text
if(!$table.find('tfoot').length){
jQuery("<tfoot></tfoot>").appendTo($table);
}
function getSum(classes)