Like Us Like Us Facebook Subscribe Subscribe us YouTube Whatsapp Share us Whatsapp Query Send your queries

Contact form 7 set default date and 7 days restriction

Contact form 7 set default date and 7 days restriction

In this tutorial we will learn how to set contact form 7’s date field restriction to today+7 days plus restrict to pick backward dates and set current value to Today’s date.

As we know contact form Date Field syntax is like given below

<label>Preferred date*
[date* preffered_date]
</label>

Now set minimum date

[date* preffered_date min:today ]

Now set date salection to upcoming 7days

[date* preffered_date min:today max:today+7days ]

Now going to add id and set the value using javascript

[date* preffered_date min:today max:today+7days id:datePicker]

 

<label>Name*
    [text* full_name] </label>

<label>Grade*
    [text* grade] </label>

<label>Subject*
    [text* subject] </label>

<label>Preferred date*
    [date* preffered_date min:today max:today+7days id:datePicker]
 </label>

<label>Timezone/Location*
    [text* timezone_location] </label>

<label>Email*
    [email* your-email autocomplete:email] </label>

<label>Phone (WhatsApp/Telegram)
[number phone]</label>
<label>Message*
    [textarea* message minlength:10 maxlength:600 ] </label>

<label>Attach file (Max. Size 10MB, allowed doc,docx,pdf,xlsx)
[file attachments limit:10mb filetypes:doc|docx|pdf|xlsx|PDF]
</label>

[submit "Submit"]

<script>
jQuery(function ($) {
   var now = new Date(); 
   var day = ("0" + now.getDate()).slice(-2);
   var month = ("0" + (now.getMonth() + 1)).slice(-2);
   var today = now.getFullYear()+"-"+(month)+"-"+(day);
  $('#datePicker').val(today);
$("#datePicker").attr("min", today);
});
</script>

JavaScript adding two integer Computer Lab Btech CSE

JavaScript adding two integer Computer Lab Btech CSE

In this tutorial we will learn how to create a HTML file(add.html) and add two integer using input element (num1 and num2) and submit button. For calculation we will use pure JavaCript.

Create a file name add.html and copy the code given below, save and run in any browser.

This java script programme is extensively used in Jharkhand and West Bengal Btech CSE Lab.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Addition</title>
</head>
<body>

<table border="1">
<tr>
<td><label>Enter No. 1</label>
<input type="text" id="num1" value="0">
</td>
<td>
<label>Enter No. 2</label>
<input type="text" id="num2" value="0">
</td>
</tr>
<tr>
<td style="text-align:center">
<button onclick="calculate()">Calculate</button>
</td>
<td style="text-align:center">
<div id="result"></div>
</td>
</tr>
</table>

<script>
function calculate(){
var num1=parseInt(document.getElementById("num1").value);
var num2=parseInt(document.getElementById("num2").value);
var sum;
sum = num1+num2;
//alert(sum);
document.getElementById("result").innerHTML=sum;
}
</script>

</body>
</html>

Run this Programme :

Create acf_form save data and Send mail from Frontend

Create acf_form save data and Send mail from Frontend

This post will cover how to create a form on the front end of your website using Advanced Custom Field acf_form() function. We can store data as well as send email also.

To load necessary CSS, JavaScript and other stuff we need to call acf_form_head() first then using acf_form() we can display and save data and using action add_action(‘acf/save_post’, ‘my_save_post’); can send email also. code is given below and added comment to so you learn easily.

Paste below this code in your template .

<?php acf_form_head(); ?>
<div id="primary" class="content-area">
    <div id="content" class="site-content" role="main">
   <?php while ( have_posts() ) : the_post(); ?>
    <?php
    $today=date("Y-m-d");
    $title="Order ".$today;
    $fields=array(
       'field_6370913bdfd02',//customer_name
       'field_636b89244cdbd',//mobile_no
       'field_636b89244cdb',//email
       'field_636b89b1f7b1e',//address
       'field_636b89bef7b1f',//pickup_date
       'field_636b8b717c297',//pick_up_time_slot
       'field_637089c9fc825'//delivery_type
    );

    acf_form(array(
        'post_id'       => 'new_post',
        //'post_title' => $title,
        'field_groups' => false,
        'fields'      => $fields,
        'new_post'      => array(
            'post_type'     => 'quick_order',
            'post_status'   => 'publish'
        ),
        'submit_value'  => 'Submit',
        'updated_message' => 'Thanks! We have received your request.',
        'return' => 'order-success',
    )); ?>
    <?php endwhile; ?>
    </div>
</div>

Now send email using code below (paste below code in functions.php.

<?php
add_action('acf/save_post', 'my_save_post');
function my_save_post( $post_id ) {
    $post = get_post( $post_id );
    
    $name = get_field('customer_name', $post_id);
    $mobile = get_field('mobile_no', $post_id);
    $emailf = get_field('email', $post_id);
    $address = get_field('address', $post_id);
    $pickD = get_field('pickup_date', $post_id);
    $pickT = get_field('pick_up_time_slot', $post_id);
    $delivT = get_field('delivery_type', $post_id);
    
    $to = '[email protected]';
    $email='[email protected]';
    $headers = 'From: ' . $name . ' <' . $email . '>' . "\r\n";
    $subject = "Quick Order";
    $body = '';
    $body .="Customer Name : ".$name."<br/>";
    $body .="Mobile No. : ".$mobile."<br/>";
    $body .="Email ID : ".$emailf."<br/>";
    $body .="Address : ".$address."<br/>";
    $body .="Pickup Date : ".$pickD."<br/>";
    $body .="Pickup Time : ".$pickT."<br/">;
    $body .="Delivery Type : ".$delivT."<br/";
    
    wp_mail($to, $subject, $body, $headers );
}
?>

Python Program to Check Leap Year

Python Program to Check Leap Year

In this tutorial we learn how to check leap year using Python 3.X program.  Leap years are years where an extra day is added to the end of the shortest month (February). This additional day is added in February which makes it 29 days long.
Leap years have 366 days instead of the usual 365 days and occur almost every four years.

#function checkLeap will leap year
def checkLeap(yr):   
  if((Year % 400 == 0) or  
     (Year % 100 != 0) and  
     (Year % 4 == 0)):   
    print("Leap Year");   
  else:  
    print ("Not a leap Year")  
# Taking an input year from user  
yr= int(input("Enter the Year: "))  
#Printing result  
checkLeap(yr)  

Save above code as chekhleap.py. Open CMD or Terminal and run command given below

For Windows :  python ./chekhleap.py

For Linux : python3 ./chekhleap.py

How to create a product in Opencart 3.X

How to create a product in Opencart 3.X

In this video tutorial I will going to show you everything you need to know about creating new products to OpenCart 3.x.

Video description : English

Video Language : Hindi

WB Police Constable Recruitment 2022 1666 posts

WB Police Constable Recruitment 2022 1666 posts

West Bengal Police Recruitment Board  has started the online application for 1666 posts out of which 1410 posts are for constables and 256 posts for lady constables from 29th May 2022.

Total no. Vacancies: 1666

Last Date for submission of Application Form: 29-05-2022

AGE (as on 01/01/2022)

Minimum Age: 18 Years

Maximum Age: 27 Years

Qualification

Madhyamik (10th passed) and above

Application Fee ( Online)

General, OBC, EWS: Rs. 170, SC/ST: 20

PHYSICAL MEASURMENT

 Height (in CM)Weight (in KG)Chest (in CM)
Male1675778, 83
Male Gorkhas, Garhwalies…1605376,81
Female16049NA
Female Gorkhas, Garhwalies…15245NA

Where to apply :

Click here to go Official Page

Kendriya Vidyalaya Admission for CLASS I for Session 2022-2023

Kendriya Vidyalaya Admission for CLASS I for Session 2022-2023

Kendriya Vidyalaya Admission for CLASS I for session 2022-2023 is already started,Now Guardian  can apply online Kendriya Vidyalaya Sangathan’s official website at https://kvsonlineadmission.kvs.gov.in.

Admission Notice 2022 Release Date28 February 2022
KV Sangathan Admission Start DateMarch 2022
KVS Admission 2022 Last DateApril 2022

Class 1 admission Requirement for Kendriya Vidyalaya:

  • A valid mobile number with Indian SIM card,
  • A valid email address,
  • A digital photograph or scanned photograph of the child seeking admission (JPEG file of size at most 256KB),
  • A scan copy of the child’s birth certificate (JPEG or PDF file of size at most 256KB),
  • Details of government certificate in case you are applying under economically weak section,
  • Transfer details of parent/grandparent whose service credentials will be used in the application.
  • For children applying under SC/ST/OBC (NCL)/EWS/BPL category, a certificate stating that the child belongs to the Scheduled Caste /Scheduled Tribe / EWS / OBC (Non-Creamy Layer) / EWS / BPL category (as applicable), issued by the competent authority in concerned State Government / Union Government must be provided at the time of admission. The certificate in respect of either of the parents may be accepted initially for the purpose of admission, if this certificate is not available for the child. However, the certificate in respect of the child has to be submitted within a period of 03 months from the date of admission.

Important: As per KVS admission guidelines, the minimum age for admission to Std 1 is 6 years and the maximum admissible age is 8 years as on 1 April, 2022, with a 2-year relaxation in upper age limit of “Differently Abled” applicants. Thus, the allowed range of date of birth of a child seeking admission to Std 1 in 2022-2023 is: 1 April, 2014 to 1 April, 2016 for applications not in the “Differently Abled” category. The allowed range of date of birth of a child seeking admission in the “Differently Abled” category is 1 April, 2012 to 1 April, 2016.

One can get more info at their Official Website https://kvsonlineadmission.kvs.gov.in/index.html

How to Install Plasma 5.24.1 on Kubuntu 21.10

How to Install Plasma 5.24.1 on Kubuntu 21.10

Want to try the latest version of Plasma 5.24.1, if you are running OpenSuse Tumbleweed then you can try easily KDE Plasma 5.24.1. If you are using Kubuntu 21.10 then using ppa/backports you can also install the latest version of Plasma desktop. This tutorial is only for Kubuntu 21.10, since it’s not an Official Upgrade, so back up your data.

Plasma 5.24 on Kubuntu 21.10

Steps to install Plasma 5.24 on Kubuntu 21.10

Open konsole and run the command given below

sudo apt update

Now add PPA, run command in Konsole

sudo add-apt-repository ppa:kubuntu-ppa/backports

Now it’s time to Upgrade

sudo apt full-upgrade

Installation will take time and also depends on your Internet Speed, since I am using slow Reliance Jio, so it took more than 30 minutes,  …if you have any problem then please let me know through comments.

Micromax IN Note 2 India Origin game changer smart phone

Micromax IN Note 2 India Origin game changer smart phone

Micromax new India Origin smart phone “Micromax IN Note 2” will be a game changer smart phone for Micromax as India consumer want to buy a truely Made in Phone with decent hardware. Micromax in note 2 comes with MediaTek Helio G95 processor that allows you to have an enhanced gaming experience, 6.43 inch Amoled Display with Glass finish design and 5000 mAh battery, its available in 4GB 64GB and 6GB 128GB storage.

Micromax in Note 2 Benchmark Score :

Antutu (v9) : 304,000

Micromax in note 2

Display Features

  • Display Size :16.33 cm (6.43 inch)
  • Resolution :2400 x 1080 Pixels
  • Aspect Ratio: 20:9
  • Display Brightness: 550 NITS
  • Resolution Type : Full HD+ AMOLED Display
  • Protection :Corning Gorilla Glass Protection

OS and Processor Features

  • OS: Android 11
  • Processor: MediaTek Helio G95
  • Processor Core: Octa Core

Memory & Storage Features

  • RAM: 4 GB
  • Internal Storage: 64 GB
  • UFS Storage 2.1
  • Expandable Storage: upto 256 GB

Camera Features

  • Primary Camera: 48MP + 5MP + 2MP + 2MP
  • Primary Camera Features: Quad Rear Camera Setup: 48MP + 5MP + 2MP + 2MP, Features: Panorama, Burst Mode, Time Lapse, Face Beauty, Night Mode, Slow motion, QR Code Scanner, Pro Mode
  • Secondary Camera: 16MP Front Camera
  • Secondary Camera Features: 16MP Front Camera, Features: Face Beauty, Night Mode, Portrait Mode
  • Flash: Rear – LED Flash | Front – Screen Flash
  • Video Recording Frame Rate: 30 fps, 60 fps

Connectivity

  • Network Type: 4G, 3G, 2G
  • 5G : No
  • Supported Networks: 4G LTE, WCDMA, GSM
  • Internet Connectivity: 4G, 3G, Wi-Fi, EDGE, GPRS
  • Bluetooth Version: v5.0
  • Wi-Fi Version: 802.11 a/b/g/n/ac
  • Audio Jack: 3.5mm
  • Infrared Blaster : NA

Battery & Dimesnion

  • 30W Charger, Side Mounted Fingerprint Scanner, Face Unlock, Quick Charging Version PE5+
  • Battery Capacity: 5000 mAh
  • Width: 74.3 mm
  • Height: 159.9 mm
  • Depth: 8.34 mm
  • Weight :205 g

Sensors

  • Gyro: Yes
  • GPS: GPS + Beidou + Glonass + Galileo
  • Magnetic (E-Compass): Yes
  • A-GPS: Yes
  • Accelerometer (G sensor): Yes
  • Proximity Sensor: Yes
  • Light Sensor: Yes
  • Fingerprint Sensor: Yes

Package Contents

1u Handset ,1u Charger , 1u User Manual, 1u Data Cable,1U Screen Guard,1u TPU, 1u SIM tool ejector.

Price :₹12,490

Conclusion : Phone has everything to lure India customer and can be a threat to its chinese counterpart like Redmi Note 9, Realme Narzo 30, Infinix note 11S andRealme 8i as it is priced aggressively.

Download Manjaro Linux 21.2.0 Qonos

Download Manjaro Linux 21.2.0 Qonos

Manjaro a Arch Linux based distro launched Manjaro Linux 21.2.0 Qonos with tons of new features and latest application. If you are afraid of Arch based distro but want to try Arch then you can try Manjaro, Garuda …. In this post will focus its Karnel, DE info with application latest version details.

About Manjaro  : As per Manjaro Official Website “Manjaro is a user-friendly Linux distribution based on the independently developed Arch operating system. Within the Linux community, Arch itself is renowned for being an exceptionally fast, powerful, and lightweight distribution that provides access to the very latest cutting edge – and bleeding edge – software. However, Arch is also aimed at more experienced or technically-minded users.”

About Manjaro Linux 21.2.0 Qonos  :  This release features major improvements to Calamares, including filesystem selection for automatic partitioning and enhanced support for btrfs. For btrfs installations, the default subvolume layout has been improved for easier rollbacks and less wasted space on snapshots. Additionally, swapfiles on btrfs filesystem are now supported. Its comes with latest version of Plasma Desktop 5.23, Gnome 41.2 and XFCE 4.16.

Manjaro Linux 21.2.0 Release Details

Distro NameManjaro
Based OnArch Linux
Distro VersionManjaro Linux 21.2.0
Desktop EnvironmentKDE Plasma Desktop 5.23
GNOME 41.2, XFCE 4.16
Websitehttps://manjaro.org/
Downloadhttps://manjaro.org/get-manjaro/
KarnelKernel 5.15 LTS
Grub2.06
Systemd249.7
Samba4.15.3
ShellBash 5.1
GCC11.1.0
QT6.2.2
Python3.9.9
VIMNA
File ManagerDolphin
GraphicsGimp 2.10.28
Inkscape 0.92.2
JavaNA
BrowserFirefox 95.0.1
Email ClientThunderbird 91.4.0
Video PlayerVLC – 3.0.16
OfficeLibra Office 7.2.4

Download Manjaro Linux 21.2.0

XFCE : manjaro-xfce-21.2.0-211220-linux515.iso (3,379MB, SHA256, signature, torrent),

GNOME : manjaro-gnome-21.2.0-211220-linux515.iso (3,353MB, SHA256, signature, torrent),

KDE PLASMA : manjaro-kde-21.2.0-211220-linux515.iso (3,651MB, SHA256, signature, torrent).

Do you have any Query / Suggestion