Linking information from Dynamic page into form

Hi there! Long time reader, first time poster!

I was hoping to avoid making a new post as there is so much information for similar problems out there but I just can’t seem to get this one working!

Related topic: https://www.wix.com/corvid/forum/community-discussion/can-i-create-a-custom-form-that-also-submits-the-page-url

I have a real estate website with a database that links to a dynamic page to show a client a property.

The issue I am having, if someone wants to submit an enquiry for a specific property, I have no idea how to make their enquiry tell me exactly which property they are looking for more information on.

Here is an example:
https://www.realestateinvestmentfinance.com.au/properties/Property-42

I have tried everything but can’t seem to get the code working below.

$w("#datasetName"#dataset#datasetName").onBeforeSave(function() {
    $w("#datasetName"#datasetName").setFieldValue('pageUrl', wixLocation.url);
});

If anyone can help how to input the information I would be super grateful!

Kind regards

Hi Fedja, Did you ever get a solution to this, please? I’m in a similar situation. Many thanks, Steve

Hi Fedja, any solution? Similar situation here.

Thanks

Apologies if you all saw the indecent content posted by that user, the user has been blocked, and the content has been deleted. Closing this thread.

@artsiomsukhadolski , can you ask a separate question in the forum with the details of your issue?