A
A
anton_myaso2016-08-15 11:59:03
JavaScript
anton_myaso, 2016-08-15 11:59:03

How to properly place js in Bitrix?

Hello.
I want to place a handler for a pair of fields in Bitrix (product property entry form), I can’t figure out where to shove the code. I don’t want to fence in all the files, I’m new to Bitrix.
Need an input control (input format) in a pair of SKU edit fields. both in the admin panel and through the catalog page.
How to do it better?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Sidorets, 2016-08-25
@v3ctor

To do this, it is better to use a component connected to the current theme. In it you include js and styles what you need.
You can take from the /bitrix/components/bitrix/component_name/desired template folder. Here is a description of working with components .
This approach will allow you to make normal fields and their logic for sites on 1C-Bitrix. Usually, validators are written
for forms so that the system does not display errors when checking. But you can not bathe and do the same . PS: I advise you to read Bitrix Site Management courses in your free time.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question