Hi David,
please note that in your code you have to events on the user viewing the page ‘timeline’:
- when the page is first displayed - $w.onReady (whatever you write here executed on ready)
- when the button was clicked - .onClick(whatever you write here executes on button4 click)
so you might want to put the new value creation on the button4 click
$w.onReady(function () {
//$w("#dataset1").onAfterSave(sendFormData);
let newvalue = $w("#input11").value;
$w("#button4").onClick( (event, $w) => {
wixLocation.to('/i/' + newvalue);
} );
});
to:
$w.onReady(function () {
$w("#button4").onClick( (event, $w) => {
wixLocation.to('/i/' + $w("#input11").value);
} );
});
i could not find input11 in your page so i couldnt really understand what you are trying to do eventually
maybe you also want to redirect only onAfterSave
shlomi