<select> does not appear with Materialize

Asked

Viewed 499 times

0

The select tag does not appear if I import the content from the other page, only if I put it directly into the index. Follow the code:

index php.

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Cadastro de Carros!</title>
  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  <link type="text/css" rel="stylesheet" href="css/materialize.css">

  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>


</head>
<body class="light-green lighten-5">

  <!-- NAVBAR -->

  <br />

  <div class="conteudo" id="conteudo">
    **<?php include 'controle.php' ?>**
  </div>

  <!--Revisar Footer -->
  <!--?php include 'footer.php' ?-->

  <script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
  <script type="text/javascript" src="js/materialize.min.js"></script>
  <script type="text/javascript" src="js/js.js"></script>
</body>
</html>

php control.

<br />
<br />
<br />
<br />

<div class="container white">
	
	<div class="row">
		<form class="col s12">
			<div class="row">
				<div class="input-field col s6">
					<input id="placa" type="text" class="validate">
					<label for="placa">Placa</label>
				</div>
				<div class="input-field col s6">
					<input id="adesivo" type="number" class="validate">
					<label for="adesivo">Nº do adesivo</label>
				</div>
			</div>
			<div class="row">
				<div class="input-field col s6">
				<select>
					<option value="volvo">Volvo</option>
					<option value="saab">Saab</option>
					<option value="mercedes">Mercedes</option>
					<option value="audi">Audi</option>
				</select>
			</div>
			<div class="input-field col s6">
					<input id="placa" type="text" class="validate">
					<label for="placa">Placa</label>
				</div>
			</div>
		</div>
	</form>
</div>


</div>

  • I don’t know what these *** but one is missing ; no include....

  • was a typo ***, but include this working friend, only select does not appear, however if I inspect the page the select code is there

  • I was forgetting to start material_select :S Thanks

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.