Category

HTML

Kaspersky replaces “input type email” to “input type text”

Recently working with WPFORMS form validation setup for one WordPress website I found out that there was no validation (red border-color for input and text error message) of email input and that was very strange for me.

I made a research and googled that Kaspersky Internet Security antivirus automatically changes type of input.

In my code I had input type=”email”, but in Google developer tools there was input type=”text”.

<input type="text" oldautocomplete="remove" autocomplete="off" kl_ab.original_type="email" aria-invalid="false">

So it had no HTML5 form validation and did not show any error when filled incorrect.

Also antivirus added “kl_ab.original_type=”email”” to my email input.

Such situation was in Google Chrome. In other browsers validation was ok.

Send simple form to email in PHP

HTML

<form action=”send.php” method=”post”>
<input type=”text” name=”tel” placeholder=”Укажите телефон” required=””>
<input id=”checkbox” type=”checkbox” name=”agree” onchange=”document.getElementById(‘submit’).disabled = !this.checked;” />
<label for=”checkbox”>Настоящим подтверждаю, что я согласен</label>

<input type=”submit” disabled=”disabled” id=”submit” value=”Отправить”><br>
<br>
</form>

Send.php

<html>
<head>
<title>Форма заявки с сайта</title>
</head>
<body>
<?php
//проверяем, существуют ли переменные в массиве POST
if(!isset($_POST[‘tel’])){
} else {
//показываем форму
$tel = $_POST[‘tel’];
$tel = htmlspecialchars($tel);
$tel = urldecode($tel);
$tel = trim($tel);

if (mail(“webokolux@gmail.com”, “Заявка с сайта”, “Телефон:”.$tel.”. \r\n”)){
echo “Сообщение успешно отправлено”;
} else {
echo “При отправке сообщения возникли ошибки”;
}
}
?>
</body>
</html>

How to place footer in the bottom of the page

<body>
  <div class="wrapper">
      content
    <div class="push"></div>
	  </div>
	  <footer class="footer"></footer>
	</body>
html, body {
  height: 100%;
  margin: 0;
}
.wrapper {
  min-height: 100%;
  /* Equal to height of footer */
  /* But also accounting for potential margin-bottom of last child */
  margin-bottom: -50px;
}
.footer,
.push {
  height: 50px;
}

How to create isometric device frame in Figma

  1. Create a component from the iPhone frame.
  2. Set all the constrains here to scale.
  3. Drag and drop to child component
  4. Rotate child component 45 degrees.
  5. Turn off constrain proportions
  6. Group child component
  7. Set H as 57.73%
  8. Add shadow (blur 44, Y 76) if needed