⚠ 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

serialize several text field value



archerwisdom
  • profile picture
  • Member

Posted 21 October 2013 - 08:24 AM

Hi,

 

Is it possible to have a different text field, let say field_text1, field_text2, field_text3 in the form. When user submit the form, these three text field values will be serialized and store into one column in DB.

 

Anyone done this before? Mind to share?


jamesmm
  • profile picture
  • Member

Posted 08 February 2014 - 22:54 PM

I too have a need for this, any thoughts?

 

I'm assuming callback functions will be used, but I didn't quite know how to do that.

 

Thanks for your input!


Amit Shah
  • profile picture
  • Member

Posted 10 February 2014 - 05:57 AM

Well its simple .. and yes as mentioned - callback functions be used in it....

callback_before_insert if u wish to store this three field values into separate table then the one set for crud - or callback_insert if it is intended to store in the same table. Here - what happens - u override the default insert method and set your own