[SOLVED] loading changing date field with data from another field

Good night, I have a form with two fields, one to enter the identity document number, and another field for the time.
I need at the moment of loading of the number of identity document, it automatically set the system time on the time field to save
thanks

loading changing date field with data from another field.jpg

Re: loading changing date field with data from another field

You want hora to be set only when the user sets a value to cedula?

regards,
Bernhard Bernsmann

Re: loading changing date field with data from another field

yes, just that I want, is it possible?

Re: loading changing date field with data from another field

Hi,
just create an “onChange”-Ajax Event for the cedula field.
Put the following code in it:

{hora}=date(‘H:i:s’);

Hope this helps.
jsb

Re: loading changing date field with data from another field

jsbinca thank you very much, I served, is just what I needed.
only changed to: {time} = date (‘HH: ii: ss’), but it worked perfectly

Re: [RESOLVIDO] loading changing date field with data from another field

amigo disculpa la molestia, tengo otra inquietud, es sobre el mismo tema pero con diferencias.
ahora tengo dos campos: uno para la fecha de nacimiento y otro para edad, quiero que al colocar la fecha de nacimiento, me de automaticamente la edad en su campo correspondiente.
lo intente con evento java, asi como me mostraste anteriormente con la hora, pero no consigo el resultado adecuado

may I ask what is hora and cedula ?
is this English ?

Arthur

Para esto tiene que hacer lo mismo que hizo con la fecha. crea un evento ajax cuando modifiques la fecha, a traves del evento haces las operaciones correspondientes con PHP y se lo asignas al campo edad.