Answer the question
In order to leave comments, you need to log in
How to uniquely identify marks from different inputs (radio, checkbox) scattered around the site?
There are various forms (independent) in which by setting the desired flag it is noted, for example, the "type" of something.
What I need - if, for example, in the first form the choice of a certain type is determined by a radio button with one id,
and in the second form the same type is selected by a checkbox, naturally with a different id - then how to make sure
that the same type (value, identifier )? To edit the code with handles, adding the necessary identifier for types to value?
For now, I’m thinking about how to simply collect the id of different inputs in a collection and associate a common type with them:
const types = new Map([
[input_id_100, typeA],
[input_id_500, typeA],
[chekbox_id_foo, typeB],
[check_bar_box, typeB],
[input_id42, typeB]
])
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question