Hi there,
I have a contact form linked to a dataset. When the contact form is submitted, I am looking to capture the full page URL, so the page URL displays in a field (which I have already created) in the dataset entry.
I understand I need to use the beforeInsert hook below:
export function myCollection_beforeInsert(item, context) {
item.urlfield = ...
return item;
}
Where the … is, what code should appear here?
Thanks in advance for your help.
Cheers,
Cameron