Ver Mensaje Individual
  #14 (permalink)  
Antiguo 14/03/2010, 21:01
Avatar de jmdz
jmdz
 
Fecha de Ingreso: marzo-2010
Ubicación: ¿Acá?
Mensajes: 54
Antigüedad: 14 años, 1 mes
Puntos: 2
Respuesta: pasar valor metido en campo a una variable

también podrías generar al vuelo los campos con JavaScript :P

Código HTML:
Ver original
  1. <form action="">
  2. <div id="div_ingredientes">
  3. <input type="text" name="ingredientes[]"/><br/>
  4. </div>
  5. <input type="button" value="agregar campo" onclick="document.getElementById('div_ingredientes').innerHTML+='<input type=\'text\' name=\'ingredientes[]\'/><br/>';"/>
  6.  
  7. <!-- el resto de los campos -->
  8.  
  9. <input type="submit" value="guardar receta"/>
  10. </form>

Suerte.