Hello.I would like to take fields by $_POST, or in any other way...Lets take basic form: Help Topic, Issue Summary, Message.I created simple array where I stores the data sent:$data = array(    'issueSum'    => Need this. 'message' => $_POST, 'topicName' => $ticket->getTopic(); //I do it lower in the code, onCreate(););As you can see. I can take message form by $_POST, topic name just by $ticket->getTopic();, but dont have idea how to take issue summary field, or any other fields...For example I created a new form section, added labels and variables, but dont have idea how to get it.It generate:<input type="text" id="_4cc8fda5d432ceb7" size="40" maxlength="50" placeholder="" name="4cc8fda5d432ceb7" value="">but I cannot use $_POST here for this id...

Please help us to help you by reading and following the posting guidelines located in this thread: Please read before requesting assistance.  The more information you give us the better we will be able to assist you. Thank you.So are you trying to use the ticket open api to open a ticket?I'm not real clear what it is you are trying to do.

Server InformationosTicket Versionv1.10.1 (9ae093d) —  Up to dateWeb Server SoftwareApacheMySQL Version5.6.36PHP Version7.0.18Im creating a notification mobile application. When I click "Create Ticket" button I need to send "Topic, Issue, and Text" as a notification. At the moment I can send Topic Name(by $variable = $ticket->getTopic();) and message (by POST method). It worked. Just added some code in open.php file.But I need to store other filled fields in variables.

Moved thread to Mods and Customizations.how about:$ticket->getSubject();

That nice idea. I will check it.

Where I can find all elements (like getSubject()) for $ticket class?

And what about other fields created by myself?

a lot of them would be in /include/class.ticket.phpI don't know how you would get custom fields (other then querying the DB directly)

Thank you, it works like a charm.For custom fields I need update files and take directly from DBI found some how-to topics:http://forum.osticket.com/d/discussion//adding-a-new-field-to-ticketshttp://www.tmib.net/adding-custom-text-fields-ticketshttp://www.tmib.net/agencies-dropdown-and-admin-ui-osticket-17stDo you know something newer? Or these link are enough?

I think that those three urls are for pre 1.9. These days custom forms and their answers are in the ost_form and ost_form_entry and ost_entry_values.

Write a Reply...