B
B
barakuda12021-08-07 04:16:11
PHP
barakuda1, 2021-08-07 04:16:11

How to pass value to fancybox?

Hello. How to pass the desired value to the fancybox form?

The form where you want to display the value:

<div id="dialog-content" style="display:none;max-width:500px;">
  <h2>Hello, world!</h2>
  <p>
    <input type="text" value="" />
  </p>
  <p>
    text
  </p>
</div>


I open it like this:

<a href="#" id="get_data" value="'.$data["id"].'" class="indigo-text"
                                     data-fancybox="dialog" data-src="#dialog-content"><i class="fas fa-long-arrow-alt-up" aria-hidden="true">Открыть</i></a
                                >


The code with the text "Open" is output in a loop, I need to pass the value of the value to the window with the fancybox in order to do further actions. How to do it? Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2021-08-07
@sslion

As in any input on the form.... Set the input id, and refer to it as much as you want...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question