Added custom field types, but value won't save for textarea etc

Hi,

I just added custom field types to InvoicePlane. It Works just well at the moment… the only problem is, that he can’t save the new value I enter inside the Textarea.

Code I used is on Gist. Search for “type” or “types” or “custom_field_types” in these files.
https://gist.github.com/visualcookie/11c8d0bc6750f710ecab

Hope someone can help me fix this. :smile:

Hi I’m not an expert, but I think in quotes/views/view.php the post-command only looks for input fields:

$('#btn_save_quote').click(function () {
...
  $.post("<?php echo site_url('quotes/ajax/save'); ?>", {
...
custom: $('**input**[name^=custom]').serializeArray()

perhabst it will work with: custom: $(’[name^=custom]’).serializeArray()

Give it try.
br
Martin

Thanks, worked. Didn’t knew that they do the DB save in JS. :smiley:

@visualcookie Are you familiar with Git and Github pull requests?

@Kovah Yeah, but what I’ve done so far is not finished yet. I’m still working on it. :smiley:

OK no problem.
Push it when its ready for take off.

I’m currently trying to figure out, how to change the characters for custom fields the fast way. Currently it’s VARCHAR 255… I updated this to 2000 but I guess to change this into TEXT in DB would be more interesting and maybe a better solution for this.

Yes change it into TEXT

This topic was automatically closed after 24 hours. New replies are no longer allowed.