QUOTE(UbuntuClient @ Aug 20 2018, 05:55 PM)
Hi,
How to redirect using submit form? Let say when user put mobile number in form and submit it will include as example link.
myprivate.com/60114357896
Then it will open whatapp. Any idea how to do it? I'm not programming or expert.
Please advice.
Thanks.
lets use below example of a simple form.
for your requirement of "redirect" using user entered mobile number, it can be achieve by changing the form's action (url it will submit to) value to use the value that user entered for phone number.
bold part is the javascript that will change the form's action
the blue part is in case you need a fixed prefix. you can use relative or absolute values
the red part is where the value for phone number is obtained from
<form method="GET" action="foo" id="myform"
onsubmit="this.action = 'hobo/' + document.getElementById('phone').value;">
<input type="text"
id="phone" value="">
<input type="submit" id="mysubmit" value="click me">
</form>
This post has been edited by bumpo: Aug 21 2018, 02:23 PM