I am writing a CRM right now, it is possible to set my own fields for a customer card, but I cannot understand how I can accept, for example, new fields through the API.

input_check - here you can specify the type of the field id field, the name of the field (displayed in the customer card).

input_content - in this table there is a binding to id_input_check (view of the field) and to the client card id_client, and of course content.

I have the data in the API using JSON

The catch is how to write incoming data to the desired input_content field, if for example my client sends a non-standard field, which is set via JSON as input_212 variable, where the digit is just id in the input_content table

How can I read the name of a variable, find the id in it, and then pull out its value (content) from this variable?

Show the solution ... maybe someone did

  • Show the code, maybe you did something. Do you think all fields have the same meaning and tasks? - Bookin
  • Yes, my API in the most usual way catches $ _POST ['phone'] variables, for example, then puts it into the database. But if for example the field created by the user and it is necessary to enter data through the API, i.e. field whose name I can not predict ... - Alexander Sizintsev

0