Combine input val ajax from two forms. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Combine input val ajax from two forms. (/showthread.php?tid=67671) |
Combine input val ajax from two forms. - wolfgang1983 - 03-23-2017 When user asks a question on my form and needs to upload a image they can by clicking on button and opens a bootstrap modal. When the user ask a question that question has its own id. I would like to know how to combine these to on my ajax code below Code: var form_upload = new FormData($('#form-upload')[0]); Question: How to combine question code val with the form upload? Code: $('input[id=\'file\']').on('change', function(e) { RE: Combine input val ajax from two forms. - spjonez - 03-23-2017 Code: form_upload.append( 'fieldname', question_code ); |