-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcadastro.html
134 lines (127 loc) · 6.56 KB
/
cadastro.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Receitas do Tio Ivan | Cadastro</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<link href="formatos.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
<script type="text/javascript">
function mascaraCEP(campo) {
let cep = campo.value;
// Remove tudo que não for número
cep = cep.replace(/\D/g, '');
// Adiciona os parênteses e o hífen no formato (00)00000-0000
cep = cep.replace(/(\d{5})(\d{3})$/, '$1-$2');
campo.value = cep;
}
</script>
<style>
main {
justify-content: flex-start; /* Isso reverte o atributo "justify-content" do elemento <main> para seu valor padrão. */
align-content: normal; /* Isso reverte o atributo "align-content" do elemento <main> para seu valor padrão. */
}
</style>
</head>
<body>
<header>
<nav>
<menu>
<li><a href="home.html">Home</a></li>
<li><a href="receitas.html">Receitas</a></li>
<li><a href="cadastro.html" class="active_link">Cadastro</a></li>
</menu>
</nav>
</header>
<main>
<div class="container-fluid">
<h1 id="cadastro_h1">Efetue seu Cadastro</h1>
<form id="form_cadastro" action="envia_email.php" method="POST">
<fieldset class="row mb-3">
<label for="nome" class="col-sm-1 col-form-label">Nome</label>
<div class="col-sm-8">
<input type="text" name="nome" id="nome" class="form-control" required>
</div>
</fieldset>
<fieldset class="row mb-3">
<label for="e_mail" class="col-sm-1 col-form-label">E-mail</label>
<div class="col-sm-8">
<input type="email" name="e_mail" id="e_mail" class="form-control" required>
</div>
</fieldset>
<fieldset class="row mb-3">
<label for="cep" class="col-sm-1 col-form-label">CEP</label>
<div class="col-sm-8">
<input type="text" name="cep" id="cep" class="form-control" minlength="9" maxlength="9" oninput="mascaraCEP(this)" pattern="[0-9]{5}-[0-9]{3}$" required>
</div>
</fieldset>
<fieldset class="row mb-3">
<label for="rua" class="col-sm-1 col-form-label">Rua</label>
<div class="col-sm-8">
<input type="text" name="rua" id="rua" class="form-control" required>
</div>
</fieldset>
<fieldset class="row mb-3">
<label for="numero" class="col-sm-1 col-form-label">N°</label>
<div class="col-sm-3">
<input type="number" name="numero" id="numero" class="form-control" required>
</div>
<label for="complemento" class="col-sm-2 text-sm-end col-form-label">Complemento</label>
<div class="col-sm-3">
<input type="text" name="complemento" id="complemento" class="form-control" required>
</div>
</fieldset>
<fieldset class="row mb-3">
<label for="cidade" class="col-sm-1 col-form-label">Cidade</label>
<div class="col-sm-5">
<input type="text" name="cidade" id="cidade" class="form-control" required>
</div>
<label for="estado" class="col-sm-1 text-sm-end col-form-label">UF</label>
<div class="col-sm-2">
<select name="estado" id="estado" class="form-control" required>
<option value="">--UF--</option>
<option value="AC">Acre</option>
<option value="AL">Alagoas</option>
<option value="AP">Amapá</option>
<option value="AM">Amazonas</option>
<option value="BA">Bahia</option>
<option value="CE">Ceará</option>
<option value="DF">Distrito Federal</option>
<option value="ES">Espírito Santo</option>
<option value="GO">Goiás</option>
<option value="MA">Maranhão</option>
<option value="MT">Mato Grosso</option>
<option value="MS">Mato Grosso do Sul</option>
<option value="MG">Minas Gerais</option>
<option value="PA">Pará</option>
<option value="PB">Paraíba</option>
<option value="PR">Paraná</option>
<option value="PE">Pernambuco</option>
<option value="PI">Piauí</option>
<option value="RJ">Rio de Janeiro</option>
<option value="RN">Rio Grande do Norte</option>
<option value="RS">Rio Grande do Sul</option>
<option value="RO">Rondônia</option>
<option value="RR">Roraima</option>
<option value="SC">Santa Catarina</option>
<option value="SP">São Paulo</option>
<option value="SE">Sergipe</option>
<option value="TO">Tocantins</option>
<option value="EX">Estrangeiro</option>
</select>
</div>
<div class="col-sm-3 d-grid gap-3">
<button type="submit" form="form_cadastro" class="btn btn-secondary">Cadastrar</button>
</div>
</fieldset>
</form>
</div>
</main>
<footer>
<ul class="footer_ul">
<li>©Ivan 2024</li>
</ul>
</footer>
</body>
</html>