Hi all,
I am rebuilding our company’s very old load board site and I’ve hit a bit of a hiccup.
I have created the Order/Truckload database and user signup form/database, and I have linked a repeater table to our Order/Truckload Database to show all our loads available.
The next step is to link the “Bid Now” button to a lightbox with a Wix Form - the issue I am having is getting the Order Number from the Repeater item they click to propagate over to the lightbox.
I have the form auto-filling the user’s information based on their Member profile with no issues, but the Order number is giving me trouble.
Here’s the load page with the “Bid Now” button circled.
And here’s the Wix Form lightbox, along with the code I already have:
import wixUsers from ‘wix-users’ ;
import wixData from ‘wix-data’ ;
$w . onReady ( function () {
wixData . query ( “Members/PrivateMembersData” )
. eq ( “_id” , wixUsers . currentUser . id )
. find ()
. then ( ( results ) => {
$w ( ‘#input1’ ). value = results . items [ 0 ]. mainPhone ;
$w ( ‘#input3’ ). value = results . items [ 0 ]. loginEmail ;
$w ( ‘#input4’ ). value = results . items [ 0 ]. name ;
});
} );
Currently, this code is functioning to automatically fill in the “Name”, “Email” and “Phone” field based on the user that is logged in. I will be adding the “Company” and “MC #” fields as well once I have those sections in the member database.
What I need to also have filled in is the “Order Number” field (input5) filled in with the Order number from whichever item in the Repeater table they have clicked. (highlighted in pic below)
The end goal will be that a vendor or customer who has created an account will only need to click “Bid Now” and enter the few inputs that aren’t auto-filled, then submit their bid. The Order Number is the last field I am having issues with!
Any help on this is appreciated!