Hi,
Hypothetical scenario here. Let’s say I have two separate databases. One for “Students” and “Classes”. Right now, students can go and find information on each class.
However, what is the best way to allow for Students to apply to be part of these classes? Ideally, I want to set the code so when a LoggedIn student clicks to apply for the class, it creates a new data entry in a third database “Applicants”. Instead of using a form to re-enter all of this information in the Applicants database, I would like the code to just automatically pull all of this from the readily available information in the Students and Classes Database.
For what it’s worth, I cannot use something like Wix Bookings for this, since it doesn’t integrate with Wix Code and doesn’t have the customization I need.
Make a dataset for reading only in the admin page (the one that you’ll be using to accept applicants or deleting them).
Then add the input fields you need and copy them again,make the first ones connected to the dataset and make the second ones hidden in the onReady event using $w(‘#input’).hide(). (Replace #input by the actual inputs’ IDs)
Once their hidden, make a button that has this in its mouseIn event :
$w('#input1').value === $w('#input2').value
And create this code for every other input. Noe that the input1 is the shown one and the input2 is its copied hidden one.
After that, make a dataset that’s Write only then connect it to all the 2nd inputs.
Connect the button you’ve already created to the Write only dataset and voilà, done !
Add next and back buttons to navigate the applicants and a delete one to reject them.
Hope that helped, I’m here if you need further explanation.