Recording user input as multiple entries in database

I am asking users to enter three items they like (via the user input buttons), and want these user inputs to register as three different database entries (in three rows) on one ‘submit button’ click. Does anyone know how to do this?

Create an array of 3 objects, then insert them, using bulkInsert():
https://www.wix.com/corvid/reference/wix-data.html#bulkInsert

thank you!

I keep having problems with bulkInsert. I am trying to insert an array into a different database. I can not for the life of me figure out the documentation as it relates to an array created from a query with varying numbers! Any points or help? I am really up against a wall on this.



export function ythHmsGenerate() {
	$w("#dataset1").getItems(0, 100)
		.then((results) => {
			console.log(results)
			let items = results.items;
			let titles = items.map(item => item.title);
			console.log(titles)
			wixData.query("NationalChampionshipRankings")
				.not(
				wixData.query("NationalChampionshipRankings")
					.hasSome("title", titles)
				)
				.eq("youthHms", true)
				.limit(100)
				.find()
				.then((results) => {//works to here and I get the correct items in the array
					wixData.bulkInsert("IndividualJudgesPlacings", results.items)
						.then((results) => {
							console.log("done");
							$w("#repeater1").expand();
						})
						.catch((err) => {
							let errorMsg = err;
						});
				})
		})
}