S
S
Sergey2018-03-04 08:54:46
JavaScript
Sergey, 2018-03-04 08:54:46

How to make automatic display of the entered text in the form to another place?

5a9b89cab04ef240902558.png

How to make it so that when you fill out the form (on the left), then automatically when printing this is all displayed in the card (on the left). Well, on the screen, I think everything is clear. Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
eRKa, 2018-03-04
@fenya-fl

On each textbox you hang up the "textInput input" event handler, remove the value from it and insert it into the appropriate field of the card. Haven't tested but something like this

$("#name").on("textInput input", function (e) {
    var val = $(this).val();
  $("#nameCard").text(val);
});

A
Andrey Privalov, 2018-03-04
@negasus

Use, for example, VueJS. Its reactivity makes it absolutely elementary.
They have Russian documentation on their site, there are examples

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question