Hello everyone
I am a noob to Power Pages.
I have a Power Pages website I created without a web template.
I have a page with a basic form that the fields on it are read, there is also a button (Update KYC).
When the button is clicked on, I want it to redirect to open the edit form.
I tried to add the javascript below:
<script>
document.getElementById('updateContactButton').onclick = function(event) {
event.preventDefault();
var urlParams = new URLSearchParams(window.location.search);
var recordId = urlParams.get('id');
var editFormUrl = '/editcontact/?id=' + recordId;
window.location.href = editFormUrl;
};
</script>
but it does not pick the ID of the record, hence I get the message that the record cannot be found.
![]()
I'll appreciate any help I can get on this.