⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

how do I copy field values ​​in another field?



Sergio Rodríguez Segura
  • profile picture
  • Member

Posted 02 April 2014 - 19:53 PM

how do I copy field values ​​in another field?

 

 

[sharedmedia=core:attachments:791]

Amit Shah
  • profile picture
  • Member

Posted 02 April 2014 - 20:17 PM

Well i prefer you do it using javascript with on change event handler on the 2 set fields which appends the value to the text area


Sergio Rodríguez Segura
  • profile picture
  • Member

Posted 02 April 2014 - 23:17 PM

How could I copy the value in the same field1 = field1 + field2?


Amit Shah
  • profile picture
  • Member

Posted 03 April 2014 - 12:22 PM

well.. u have to use javascript .. its simple programing in it :)

field = field + field1

field = field + field 2

 

2 statements should do the trick


Sergio Rodríguez Segura
  • profile picture
  • Member

Posted 03 April 2014 - 15:34 PM

       public function _callback_modificado_log($p) /// 
        {
            $user = $this->ion_auth->user()->row();
            //$log = echo $this->input->post('actividades_log');
            $p['actividades_log'] .=  $actividades_log . '<br>' . $this->input->post('actividades') . '<br> Modificado por ' . $user->username . ' a las ' . date("Y-m-d H:i:s");               
           return $p;
 
        }

 

As I copy the content $actividales_log + contenido1 + contenido2???


Amit Shah
  • profile picture
  • Member

Posted 03 April 2014 - 18:09 PM

My dear friend,

 

you dont need to do a callback.. u need to use javascript / jquery (event on change) ...

when ever you need to copy the values entered by the user in the set text fields, u need to copy it using jquery and append it to text area ... cuz i believe u need it runtime on client end and not on the backend / server side


Sergio Rodríguez Segura
  • profile picture
  • Member

Posted 04 April 2014 - 00:35 AM

Mi idea es, tener un campo donde puedar llevar el registro de cambios que se agregen sin que el texto anterior sea editable, por cada cambio que se haga agregar la hora y el usuario que lo hace, como lo haria??


robitul
  • profile picture
  • Member

Posted 23 May 2014 - 17:03 PM

Dear amit shah,
Can you tell me how to automatically fill field1 to field2 * field3 / (field1 = field2 * field3) when field2 and field3 onchange. I hope your help, if possible with the script. thank you