Values from Public Forms are blank on the SP List

I have a public form that I'm using the fd.beforeSave(function () to set certain fields left blank to 0 values and then pass the information to Power Automate to save the info on SharePoint. The logic seems to work on the form but when it saves the information on SharePoint through Power Automate, the values are all blank. Please advise. I have attached the code I'm using.

Pre Save Javascript.txt (4.4 KB)

Hello @adasilva,

In fd.beforeSave() function, the form data is passed as an object representing user’s input. To change the data before processing it, use this code:

fd.beforeSave((data) => {
    data.Title = 'New Title';
    data.Price = 50;
});
1 Like