Add extra Information to lightbox form submission

We have a repeater connected to a database with a button Upon clicking that button it opens a lightbox which displays some information from the same database along with a form. While collecting information from the form , we want to also collect some information from that database to know which button(or which container) was clicked by the user.

Hello.

You declare variables on top of your code panel then assign element IDs to these variables inside your event handlers depending on which element was clicked then insert the element IDs to your database collection.

let myElement;

$w("#myElement").onClick((event) => {
    myElement = $w("#myElement");
 //Add insert code to insert element Ids to the collection
 
});

Good luck!

Hi,
I would like to insert a field into a collection from a lightbox that is not in the list of inputs that a user can enter data into (and that are then later parsed and inserted into the collection upon clicking the submit button).

Say for example there is text that is not part of the list of inputs that a user can manipulate. I would then like to submit this text field along with other fields that are inserted into a collection.

From a data perspective, I am trying to link two tables together with this input field that is already displayed in a lightbox and is not modifiable. Could you please let me know how to achieve this?

I want to open a lightbox that has a list of my playlist in a collection. The same lightbox has an input that accepts me to create a new playlist. How do I achieve this from the masterPage