functions – redirecting a URL if accessed directly

Question

I have created a WordPress site, in which I have created a form using wpforms the url of this form is www.xyz.com/form

hierarchy to this URL is

home > Download > download with kyc > verify via mobile OTP > form

now currently the url is directly accessible, like anyone can visit open www.zyx.com/download/download-with-kyc/verifyOTP/form

All I want is if someone opens it directly, then they get redirected to verifyOTP page first once then they move towards filling the form.

and I also want to set a time for a user who is filling the form
for this right now I am using

Redirection Code:

// redirect for OTP 
window.setTimeout(function() {
    window.location.href="#verifyOTP page";
}, 30000);

Code placed in advance section of elementor (Custom JS)

0
daitiva 1 year 2021-12-15T07:46:53-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse