P
P
Pavel Sidorov2020-07-15 19:34:56
1C-Bitrix
Pavel Sidorov, 2020-07-15 19:34:56

How to make an order number in the contact form?

Good.
Guys tell me. So far, purely theoretically))
The easiest way.

There is a contact form. I made it in jquery. How to implement number system in this form? Suppose an order number 1, 2, etc. comes to the post office.

It's probably better to do it on the handler side. And then transfer it to the mail template. But I can't quite figure it out

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
PetrPo, 2020-07-16
@pavel__sidorov

In the mail template you write like your order number #ORDER_ID# and then you make a replay on the ID of the infoblock element

and if I want with serial number that?

Make a property in the infoblock, before adding a new element, get the last element and the value of this property, +1 and you're done, then follow the scheme described above.
Just logically, the application number should assume a unique value, and this is the element ID, or then add a handler so that you cannot manually change the value of this property, but only when adding a new element

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question