在我的表单中单击提交按钮而不填写数据时,同时需要两个字段,一个是输入文本,第二个是选择。这是正常的吗?我想要求从上到下的字段。
我的代码
<form class="well span8" name="contact-form" action="<?php echo base_url();?>main/validar_contacto" method="post">
<div class="row">
<div class="span3">
<label>Nombre</label>
<input type="text" name="fnombre" class="span3" placeholder="Nombre" id="fnombre" required minlength="10" data-validation-minlength-message="muy pocos caracteres">
<label>Apellidos</label>
<input type="text" name="fapellidos" class="span3" placeholder="Apellido" required>
<label>Email </label>
<div class="input-prepend">
<span class="add-on"><i class="icon-envelope"></i></span>
<input type="email" name="femail" id="inputIcon" class="span2" style="width:233px" placeholder="Ingrese email" required>
</div>
<label>Télefono</label>
<input type="text" name="ftelefono" class="span3" placeholder="Teléfono">
<label>Celular</label>
<input type="text" name="fcelular" class="span3" placeholder="Celular">
<label>Ciudad</label>
<input type="text" name="fciudad" class="span3" placeholder="Ciudad" required>
<label>Dirigido a:
<select id="dirigido" name="fdirigido" class="span3" required>
<option value="" <?php echo set_select('fdirigido', '', true);?>>Seleccione:</option>
<option value="ventas" <?php echo set_select('fdirigido','ventas');?>>Ventas</option>
<option value="contacto" <?php echo set_select('fdirigido','contacto');?>>Contacto</option>
</select>
</label>
</div>
<div class="span5">
<label>Mensaje</label>
<textarea name="fmensaje" id="message" class="input-xlarge span5" rows="8" required></textarea>
</div>
</div>
<button type="submit" class="btn btn-primary contact">Enviar</button>
</form>
我正在附上一张描绘行为的图像。
谢谢