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

populating user form fields via API


I have json api working on 1.9.1, however I can't find a way to populate user form fields via the api.  Should this be possible?


Also, I can only create a request via API for a TopicID that has a user form defined if I make all the fields in that form as Not Required.  Otherwise I gt a validation error.  However if I try populating via api using either the field variable name or the label it fails to validate.


Any advice welcome.



  • edited May 2014
    I do not beleive that there were any changes from to 1.9.1 in the API so I would direct you to:

    The attached sample has examples of how to populate custom list entries and custom text fields. (line 46, 47).
  • Thanks for your feedback.


    I had been following this sample.  As the field name in the call to the API if I have tried using the variable name as known to the database, which seemed to be the value I needed to use, I have tried the label (just in case) and I have also tried the long hex variable I see in the $vars variable if I step through the normal creation logic.

    If I step through the api php and ticket creation I seem to be getting the same variables as a normal staff creation, yet it's just not storing the data in the case of the api call.



  • You use the variable name as seen in Admin panel -> Manage -> Forms -> Ticket Details in the Variable Name field.  Also they are case sensitive.
Sign In or Register to comment.