Hello.
I have a site going that uses databases.
Its an Order Tracker. A user will type their part number in a text box and press a button. Based on the number they input, they will be directed to a different page with their order status. All of that works good.
But when the order status page loads, it does a query searching for the part number they put in and returns the results (purchase order, due date, etc.) and inserts the specified data fields into the specified text fields.
When the page loads, before the query, all the text fields are "0000000". You can see they are there for a split second and then the text seems to delete(the size of the page shrinks)
I logged the results in console and they return as they are in the database, so it shouldn't be setting the text to blank
Here is the code I use when the status page loads and runs the query
import wixData from 'wix-data';
$w.onReady(function () {
//TODO: write your page related code here...
wixData.query("Orders").eq("id", $w("#partnumber").text).find()
.then((result)=>{
//$w("#partnumber").text = $w("#page1").title
$w("#text8").text = result.items[0].deliveryDate
$w("#duedate").text = result.items[0].duedate
$w("#purchaseOrder").text = result.items[0].purchaseOrder
});
})
Please post the editor URL of your site. Only authorized Wix personnel can get access to your site in the editor. Please include the name of the page involved.