Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

field from custom form cannot insert to database

i create a new form field to contact information.but when i insert a value to that field,it's not insert value to database.
i try to create a new field to ticket information,nothing errors and value from that field can insert to database.
i running fresh installment v1.8.0.2.
thx before


  • When I understand you correct you try to insert a value normally via the gui of osticket but the value is not saved, is that correct? The field was normally created via the gui? Do you get an error message?
  • yes that correct.
    i added field normally from custom form.
    everything seems fine nothing error message was appear.
  • Hmm, I have done this also just with a fresh test installation. It works for me. Seems to be something wrong with your environment. Maybe there is an error in your php log or in the osticket log (Admin Panel->Dashboard->System Logs) that helps to see why that doesn't work.
  • i try your suggestion about system log and it show like this:

    CREATE TABLE `ost_ticket__cdata` (PRIMARY KEY (ticket_id)) AS SELECT entry.`object_id` AS ticket_id, MAX(IF('subject', ans.value, NULL)) as `subject`, MAX(IF('priority', ans.value, NULL)) as `priority`, MAX(IF('priority', ans.value_id, NULL)) as `priority_id`, MAX(IF('Apps', ans.value, NULL)) as `Apps`, MAX(IF('Module', ans.value, NULL)) as `Module`, MAX(IF('Category', ans.value, NULL)) as `Category`, MAX(IF('Sub-Category', ans.value, NULL)) as `Sub-Category`, MAX(IF('locate', ans.value, NULL)) as `locate` FROM ost_form_entry entry JOIN ost_form_entry_values ans ON ans.entry_id = JOIN ost_form_field field ON WHERE entry.object_type='T' GROUP BY entry.object_id] Table 'ost_ticket__cdata' already exists

    ---- Backtrace ----
    #0 C:\xampp\htdocs\support\include\mysqli.php(132): osTicket->logDBError('DB Error #1050', '[CREATE TABLE `...')
    #1 C:\xampp\htdocs\support\include\class.dynamic_forms.php(238): db_query('CREATE TABLE `o...')
    #2 C:\xampp\htdocs\support\include\class.dynamic_forms.php(218): TicketForm::buildDynamicDataView()
    #3 C:\xampp\htdocs\support\include\staff\ TicketForm::ensureDynamicDataView()
    #4 C:\xampp\htdocs\support\scp\tickets.php(626): require_once('C:\\xampp\\htdocs...')
    #5 C:\xampp\htdocs\support\scp\index.php(17): require('C:\\xampp\\htdocs...')
    #6 {main}
  • Are you sure you made a fresh install? This seems to me that osticket could'nt been successfully installed because there is a data/table from a former installation of osticket ->Table 'ost_ticket__cdata' already exists. This is a table from osticket, it couldn't been created because it already exists in the database..
  • well not actually fresh install.
    but,i don't change anything about database and file.
    i import this database from another server to my localhost.
  • Strange, when the environment does fit the system requirements, you didn't modify osticket and transferred it 1:1 it should also work crrectly on your local host in my opinion..
  • what is the name of file that insert query to database from custom form
  • This question I'm unfortunately not able to answer. As I can see you started another thread at github with the same issue (, you should maybe link from there to this thread so the supporting people can see all information about this problem to better assist you. 
Sign In or Register to comment.