Skip to content

Ejerciciodeformulario#3

Open
mayravargasbecerra13 wants to merge 4 commits intomainfrom
ejerciciodeformulario
Open

Ejerciciodeformulario#3
mayravargasbecerra13 wants to merge 4 commits intomainfrom
ejerciciodeformulario

Conversation

@mayravargasbecerra13
Copy link
Copy Markdown
Owner

No description provided.

Comment thread 4-forms-validations/form.html Outdated
Comment on lines +14 to +15
<label for="name">Apellido</label>
<input type="text" id="apellido" name="user_name"> <br>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<label for="name">Apellido</label>
<input type="text" id="apellido" name="user_name"> <br>
<label for="apellido">Apellido</label>
<input type="text" id="apellido" name="last_name"> <br>

Comment on lines +18 to +19
<label for="date"> fecha</label>
<input type="date" id="start" name="trip-start"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<label for="date"> fecha</label>
<input type="date" id="start" name="trip-start"
<label for="start">fecha de nacimiento</label>
<input type="date" id="start" name="trip-start"

Comment thread 4-forms-validations/form.html Outdated
Comment on lines +22 to +24
<input type="radio" name="Hombre" value="Hombre"> Hombre

<input type="radio" name="Mujer" value="Mujer"> Mujer <br>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<input type="radio" name="Hombre" value="Hombre"> Hombre
<input type="radio" name="Mujer" value="Mujer"> Mujer <br>
<select name="gender" id="gender">
<option value="m">Masculino</option>
<option value="f">Femenino</option>
<option value="o">Otro</option>
</select>

En la actividad se especifica usar un <select> para el caso del género.

Comment thread 4-forms-validations/form.html Outdated
Comment on lines +25 to +26
<label for="">Estrato 2 </label>
<input type="radio" name="socioeconómico">
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Para los estratos es necesario usar <input type="radio" /> y todos deben tener el mismo name para que se pueda escoger solamente uno.

Comment thread 4-forms-validations/form.html Outdated
Comment on lines +29 to +32
<label>Ciclismo<input type="checkbox" id="cbox1" value="checkbox"></label><br>
<label>Patinaje<input type="checkbox" id="cbox2" value="checkbox"></label><br>
<label>Gym<input type="checkbox" id="cbox3" value="checkbox"></label><br>
<label>Baloncesto<input type="checkbox" id="cbox4" value="checkbox"></label><br>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<label>Ciclismo<input type="checkbox" id="cbox1" value="checkbox"></label><br>
<label>Patinaje<input type="checkbox" id="cbox2" value="checkbox"></label><br>
<label>Gym<input type="checkbox" id="cbox3" value="checkbox"></label><br>
<label>Baloncesto<input type="checkbox" id="cbox4" value="checkbox"></label><br>
<label for="ciclismo">Ciclismo<input type="checkbox" id="ciclismo" value="checkbox"></label><br>
<label for="patinaje">Patinaje<input type="checkbox" id="patinaje" value="checkbox"></label><br>
<label for="gym">Gym<input type="checkbox" id="gym" value="checkbox"></label><br>
<label for="baloncesto">Baloncesto<input type="checkbox" id="baloncesto" value="checkbox"></label><br>

El valor de for del label debe coincidir con el id del campo y además es necesario usar nombres explicitos para evitar ambiguedades.

Comment thread 4-forms-validations/form.html Outdated
<label>Patinaje<input type="checkbox" id="cbox2" value="checkbox"></label><br>
<label>Gym<input type="checkbox" id="cbox3" value="checkbox"></label><br>
<label>Baloncesto<input type="checkbox" id="cbox4" value="checkbox"></label><br>
<form name="subir-imagen" type="POST" enctype="multipart/formdata" > <input type="file" name="imagen" />
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<form name="subir-imagen" type="POST" enctype="multipart/formdata" > <input type="file" name="imagen" />
<input type="file" name="imagen" />

Falta el <label> para el campo imagen.

<label>Gym<input type="checkbox" id="cbox3" value="checkbox"></label><br>
<label>Baloncesto<input type="checkbox" id="cbox4" value="checkbox"></label><br>
<form name="subir-imagen" type="POST" enctype="multipart/formdata" > <input type="file" name="imagen" />
<button>Enviar</button>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<button>Enviar</button>
<button type="submit">Enviar</button>

Es igual el comportamiento por defecto, pero es mejor ser explicitos de la intención del botón.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants