I have a Bids list with a lookup column Title pointing to Auctions list.

when people create a new bid for a specific Auction, I would like to retrieve the max bid and increment by 10 for that Auction and enter as new Amount. When Auction title is changed the Amount should change automatically.

enter image description here

I would like to achieve this by using JavaScript on the NewForm in Bids list.

I haven't used JavaScript in NewForm before. Detailed instructions would be much appreciated.

I have used the javascript code from this link but I could not get it to work.


  • Will you please share your code. – Niranjan Kulkarni Oct 12 '16 at 13:39
  • There is no code to share at the moment... – Aslan Oct 12 '16 at 13:42
  • We can achieve it by implementing PreSaveAction method in newform. – Niranjan Kulkarni Oct 12 '16 at 13:43
  • can you send me a sample code where I can start? – Aslan Oct 12 '16 at 13:45
  • So you have "max bid" in the Auctions List? You want to take the "max bid" from Auctions List based on the choice that you selected on lookup? – Thales Chemenian Oct 20 '16 at 17:57

Just add the PreSaveAction method in the new form code. Dont forget to make the copy of the NewForm. Make customisations in the new form copy.

If you’re customizing SharePoint listforms or SharePoint forms you have normally a save or cancel button. If you want to have a pre-action for the save button, that means there should something happen before the item will be saved if the user clicks on the save button, you can use the javascript function PreSaveAction(). This function takes place before saving the item.

For more information see below links,




| improve this answer | |
  • Thank you for your answer but it does not cover the section that I need to display the max bid for the auction. – Aslan Oct 12 '16 at 17:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.