Skip to content

Commit

Permalink
Exercícios de formulários
Browse files Browse the repository at this point in the history
  • Loading branch information
FThiagoB committed Jun 18, 2024
1 parent e7c2683 commit 2bcac7e
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 2 deletions.
2 changes: 2 additions & 0 deletions exercícios/ex25/cadastro.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Os dados foram enviados!
A construção da página foi adiada até aprender PHP.
4 changes: 2 additions & 2 deletions exercícios/ex25/form001.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ <h1>Criando formulários</h1>
<hr>

<p>
A estrutura mínima para criar um formulário é usado abaixo.
A estrutura mínima para criar um formulário é usado abaixo. Exemplos: <a href="./form002.html">form002.html</a> e <a href="./form003.html">form003.html</a>.
</p>

<!-- Os labeis são linkados por meio dos id's -->
<form action="#" autocomplete="off">
<form action="./cadastro.php" autocomplete="off" method="GET">
<p><label for="inome">Nome:</label>
<input type="text" name="nome" id="inome">
</p>
Expand Down
44 changes: 44 additions & 0 deletions exercícios/ex25/form002.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Formulários</title>

<style>
*{
font-family: Arial, Helvetica, sans-serif;
}

h1{
text-align: center;
font-variant: small-caps;
}

body > p{
text-indent: 1em;
}

form{
padding: 25px;
}
</style>
</head>
<body>
<h1>Teste de formulários</h1>
<hr>

<form action="./cadastro.php" method="POST" autocomplete="on">
<p><label for="iusu">Usuário:</label>
<input type="text" name="usu" id="iusu" required minlength="15" maxlength="20" size="15" placeholder="Nome do usuário" autocomplete="username">
</p>

<p><label for="isen">Senha:</label>
<input type="password" name="sen" id="isen" required minlength="8" size="8" placeholder="Senha" autocomplete="current-password">
</p>

<p><input type="submit" value="Enviar">
<input type="reset" value="Limpar"></p>
</form>
</body>
</html>
56 changes: 56 additions & 0 deletions exercícios/ex25/form003.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Formulários</title>

<style>
*{
font-family: Arial, Helvetica, sans-serif;
}

h1{
text-align: center;
font-variant: small-caps;
}

body > p{
text-indent: 1em;
}

form{
padding: 25px;
}
</style>
</head>
<body>
<h1>Teste de formulários (II)</h1>
<hr>

<form action="./cadastro.php" method="get" autocomplete="on">
<p><label for="inome">Nome:</label>
<input type="text" name="nome" id="inome" required minlength="10" maxlength="30" placeholder="Nome completo" autocomplete="name" required>
</p>

<p><label for="imedia">Média:</label>
<input type="number" name="media" id="imedia" min="0" max="10" placeholder="Média (0-10)" step="0.25" value="0" required>
</p>

<p><label for="imes">Período Letivo:</label>
<input type="month" name="mes" id="imes" value="2024-06">
</p>

<p><label for="idia">Dia da Prova:</label>
<input type="date" name="dia" id="idia">
</p>

<p><label for="ihora">Horário da prova:</label>
<input type="time" name="hora" id="ihora">
</p>

<p><input type="submit" value="Enviar">
<input type="reset" value="Limpar"></p>
</form>
</body>
</html>

0 comments on commit 2bcac7e

Please sign in to comment.