E
E
Egor2021-04-12 14:31:35
1C-Bitrix
Egor, 2021-04-12 14:31:35

Bitrix, how to get data from the field?

There is an order page. Near the cost of the basket, the field "Enter coupon number". So, I need to get the string that the client entered there. How to do it? I heard that it is possible through $arResult, but, unfortunately, I could not find it myself. Colleagues, tell me?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Egor, 2021-04-15
@failure_knight

Guys, I did it. In general, we slightly changed the task in terms of automatically pulling out the client's phone number and working with them. Instead of taking data from the field. This action is done like this:

private function getUserPhone(){
        $iContact = (new \CUser)->GetID();
        $curUser = CUser::GetByID($iContact)->fetch();
        $this->PHONE_CARD_NUMBER = $curUser["PERSONAL_PHONE"];
    }

E
Ex1st, 2021-04-12
@Ex1st

There is such an option: https://dev.1c-bitrix.ru/api_d7/bitrix/main/reques...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question