Hi guys,
I’m looking to find a solution to my websites form design/function.
I have a form set up on a page. I have a text box on my home page with a button which is linked to the form page. What I want to achieve is when someone inputs details to the text box on the home page and presses submit, this data will show in the first text box of the form on the form page.
If someone navigates straight to the form page I want the form to be set up normally I.e, just show standard place holder text.
Hope this makes sense and any advice is much appreciate!
Hi Simen,
I've tried that code but the enter function doesn't seem to be working. I really appreciate your time and help with my questions so don't feel like you need to keep on coming back to me!
So all the buttons and code are working as they should in the above code.
However when I add the new code (onKeypress event) it is not working. So when I press enter its not navigating to the start selling page
Hi Simen thanks for coming back to me again.
I've tried to add into the code but it doesn't seem to want to play ball? I not sure if it makes any difference but I have a number of inputs and buttons now set up for the input box (a slideshow which rotates around different placeholder texts in the search box)
See full code below
$w.onReady(function () { ($w('#button4')).onClick(()=>{ memory.setItem("input", $w('#input16').value) wixLocation.to("/copy-of-start-selling"); }) }); $w.onReady(function () { ($w('#button5')).onClick(()=>{ memory.setItem("input", $w('#input17').value) wixLocation.to("/copy-of-start-selling"); }) }); $w.onReady(function () { ($w('#button3')).onClick(()=>{ memory.setItem("input", $w('#input18').value) wixLocation.to("/copy-of-start-selling"); }) }); $w.onReady(function () { ($w('#button6')).onClick(()=>{ memory.setItem("input", $w('#input19').value) wixLocation.to("/copy-of-start-selling"); }) }); $w.onReady(function () { ($w('#button7')).onClick(()=>{ memory.setItem("input", $w('#input20').value) wixLocation.to("/copy-of-start-selling"); }) })
Hey Simen,
Just one question following your help the other day. Is there a way the code can be programmed so that when the input search box is filled enter can be pressed to navigate to the 'Start Selling' page rather than having to press the submit button?
Many thanks
That worked! Thanks very much for your help
Ok so I've removed the additional text. I've tried changing the input #'s but not having any luck.
The box where the customer starts typing and presses submit is input#15
The form field I want this answer to show in is input #4
Really appreciate your help!
Yes I’ve done for them
Yes I’ve done for them
Did you set the # names for the input field, button and form field?
Hi Simen,
I can't seem to get that working. I've added the appropriate input fields into the code above. Do I need to change the 'wix-storage' details?
Hi Simen,
That wouldn't be a problem
It's possible to do with Velo if you're ok with using that.