Skip to content

Instantly share code, notes, and snippets.

View reachkamrul's full-sized avatar
😁

Md Kamrul Islam reachkamrul

😁
View GitHub Profile
@media (max-width: 480px){
@supports (-webkit-touch-callout: none) {
/* CSS specific to iOS devices */
.vff-footer {
bottom: 25px !important;
}
}
@supports not (-webkit-touch-callout: none) {
/* CSS for other than iOS devices */
.vff-footer {
{
onChange: function(selectedDate) {
var date = selectedDate[0] ;
date.setDate(date.getDate()+2);
const fp = flatpickr('.set_date', {
disableMobile: "true",
dateFormat: "d-M-y"
});
fp.setDate(date)
}
/*
* Get user id
* {my_id}
*/
add_filter('fluentform_editor_shortcode_callback_my_id', function ($val) {
$current_user_id = get_current_user_id();
return $current_user_id;
});
// Add this code to First Date
{
minDate: "today",
disableMobile: "true",
onChange: function(selectedDate, dateString) {
var date = selectedDate[0];
flatpickr('.endingDate', {
"minDate": date,
// Fluent Forms RTL entries fix
add_action('admin_head', 'RTL_form_dashboard_fix');
function RTL_form_dashboard_fix() {
echo '<style>
.ff_form_entries_app .el-table--hidden, .ff_form_application_container .el-table td.is-hidden>*,.ff_form_application_container .el-table th.is-hidden>* {
visibility: visible;
}
.ff_form_application_container .el-table__fixed, .el-table__fixed-right{
display:none;
var columnKey = "mileage"; //Give your column key here
function runAll (){
$table.on('ninja_table_all_chunk_loaded', () => {
setTimeout(
function()
{
$('tbody .ninja_clmn_nm_'+columnKey).each(function(){
$(this).text( $(this).text().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,") );
});
add_filter('fluentform_validate_input_item_input_email', function ($error, $field, $formData, $fields, $form) {
/*
* add your accepted domains here
* Other domains will be failed to submit the form
*/
$targetFormId = 20;
$acceptedDomains = ['gmail.com', 'yahoo.com'];
$errorMessage = 'The provided email domain is not accepted';
var passField = $form.find('input[data-name=password]');
passField.wrap("<div class='ff_input-group'></div>");
passField.after('<div class="ff_input-group-append"><span class="ff_input-group-text"><i style="cursor:pointer;" class="dashicons dashicons-hidden toggle-password"> </i></span></div>');
$form.find(".toggle-password").click(function() {
$(this).toggleClass("dashicons-visibility dashicons-hidden");
if (passField.attr("type") == "password") {
passField.attr("type", "text");
} else {
add_filter( 'fluentform_response_render_input_password', function($response_field_key, $field, $formId, $isHtml){
$hash = str_repeat("*", strlen($response_field_key)).' '. __('(truncated)', 'fluentform');
return $hash;
} , 10, 4);
function hideArchive (){
$table.find('tbody .ninja_clmn_nm_poststatus').each(function(){
var colText = jQuery(this);
if(colText.text() == "archive"){
colText.parents('tr').remove()
}
})
}
hideArchive();