Routing-Forms/External Redirect URL improvement (#8487)
This commit is contained in:
@@ -215,14 +215,14 @@ const Route = ({
|
||||
name="externalRedirectUrl"
|
||||
className="border-default flex w-full flex-grow text-sm"
|
||||
containerClassName="w-full mt-2"
|
||||
type="text"
|
||||
type="url"
|
||||
required
|
||||
labelSrOnly
|
||||
value={route.action.value}
|
||||
onChange={(e) => {
|
||||
setRoute(route.id, { action: { ...route.action, value: e.target.value } });
|
||||
}}
|
||||
placeholder="Enter External Redirect URL"
|
||||
placeholder="https://example.com"
|
||||
/>
|
||||
) : (
|
||||
<div className="block w-full">
|
||||
|
||||
@@ -86,7 +86,7 @@ function RoutingForm({ form, profile, ...restProps }: inferSSRProps<typeof getSe
|
||||
} else if (decidedAction.type === "eventTypeRedirectUrl") {
|
||||
router.push(`/${decidedAction.value}`);
|
||||
} else if (decidedAction.type === "externalRedirectUrl") {
|
||||
window.location.href = decidedAction.value;
|
||||
window.parent.location.href = decidedAction.value;
|
||||
}
|
||||
// showToast("Form submitted successfully! Redirecting now ...", "success");
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user